mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Creating new definitions for "md5-file" (#29505)
This commit is contained in:
parent
a9d806263a
commit
f03bd00508
11
types/md5-file/index.d.ts
vendored
Normal file
11
types/md5-file/index.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Type definitions for md5-file 4.0
|
||||
// Project: https://github.com/roryrjb/md5-file#readme
|
||||
// Definitions by: BamButz <https://github.com/BamButz>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare var module: {
|
||||
(filename: string, cb: (err: Error, hash: string) => void): void;
|
||||
sync: (filename: string) => string;
|
||||
};
|
||||
|
||||
export = module;
|
||||
9
types/md5-file/md5-file-tests.ts
Normal file
9
types/md5-file/md5-file-tests.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import * as md5 from "md5-file";
|
||||
|
||||
// $ExpectType void
|
||||
md5("test.txt", (err, hash) => {
|
||||
return;
|
||||
});
|
||||
|
||||
// $ExpectType string
|
||||
md5.sync("text.txt");
|
||||
23
types/md5-file/tsconfig.json
Normal file
23
types/md5-file/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strictFunctionTypes": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"md5-file-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/md5-file/tslint.json
Normal file
1
types/md5-file/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user