mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Fix nodejs StringDecoder definition (#10100)
This commit is contained in:
committed by
Mohamed Hegazy
parent
d726a1348e
commit
b54fdb6595
@@ -19,6 +19,8 @@ import * as childProcess from "child_process";
|
||||
import * as cluster from "cluster";
|
||||
import * as os from "os";
|
||||
import * as vm from "vm";
|
||||
import * as string_decoder from "string_decoder";
|
||||
|
||||
// Specifically test buffer module regression.
|
||||
import {Buffer as ImportedBuffer, SlowBuffer as ImportedSlowBuffer} from "buffer";
|
||||
|
||||
@@ -699,6 +701,18 @@ namespace readline_tests {
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
/// string_decoder tests : https://nodejs.org/api/string_decoder.html
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
namespace string_decoder_tests {
|
||||
const StringDecoder = string_decoder.StringDecoder;
|
||||
const buffer = new Buffer('test');
|
||||
const decoder = new StringDecoder('utf8');
|
||||
const part: string = decoder.write(new Buffer('test'));
|
||||
const end: string = decoder.end();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
/// Child Process tests: https://nodejs.org/api/child_process.html ///
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user