mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-04 14:29:06 +08:00
13 lines
307 B
TypeScript
13 lines
307 B
TypeScript
import unique = require('unique-hash-stream');
|
|
|
|
const stream = unique();
|
|
unique(doc => {
|
|
doc; // $ExpectType any
|
|
return 'foo';
|
|
});
|
|
stream; // $ExpectType Transform
|
|
unique.Unique; // $ExpectType typeof Transform
|
|
unique.calculate; // $ExpectType (doc: any) => string
|
|
|
|
stream instanceof unique.Unique;
|