mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Create a type definition for npm module ssdeep (#38264)
This commit is contained in:
parent
0043edad70
commit
fc2b1b6d16
10
types/ssdeep/index.d.ts
vendored
Normal file
10
types/ssdeep/index.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Type definitions for ssdeep 0.1
|
||||
// Project: https://github.com/pchaigno/node-ssdeep
|
||||
// Definitions by: Arne Schubert <https://github.com/atd-schubert>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export function compare(hash1: string, hash2: string): number;
|
||||
|
||||
export function hash(content: string): string;
|
||||
|
||||
export function hash_from_file(path: string): string;
|
||||
8
types/ssdeep/ssdeep-tests.ts
Normal file
8
types/ssdeep/ssdeep-tests.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { compare, hash, hash_from_file } from 'ssdeep';
|
||||
|
||||
let str = 'string';
|
||||
let num = 123;
|
||||
|
||||
num = compare(str, str);
|
||||
str = hash(str);
|
||||
str = hash_from_file(str);
|
||||
23
types/ssdeep/tsconfig.json
Normal file
23
types/ssdeep/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"ssdeep-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/ssdeep/tslint.json
Normal file
1
types/ssdeep/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user