mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
adds typings for the 'toposort' package
This commit is contained in:
parent
e6568c65f5
commit
45baf1fcd5
6
types/toposort/index.d.ts
vendored
Normal file
6
types/toposort/index.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
// Type definitions for toposort 2.0
|
||||
// Project: https://github.com/marcelklehr/toposort
|
||||
// Definitions by: Daniel Byrne <https://github.com/danwbyrne>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export default function toposort(graph: ReadonlyArray<[string, string]>): ReadonlyArray<string>;
|
||||
19
types/toposort/toposort-tests.ts
Normal file
19
types/toposort/toposort-tests.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import toposort from 'toposort';
|
||||
|
||||
const testGraph: ReadonlyArray<[string, string]> = [
|
||||
[
|
||||
'string1',
|
||||
'string2',
|
||||
],
|
||||
[
|
||||
'string2',
|
||||
'string3',
|
||||
],
|
||||
[
|
||||
'string3',
|
||||
'string1',
|
||||
],
|
||||
];
|
||||
|
||||
// $ExpectType ReadonlyArray<string>
|
||||
toposort(testGraph);
|
||||
23
types/toposort/tsconfig.json
Normal file
23
types/toposort/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"toposort-tests.ts"
|
||||
]
|
||||
}
|
||||
3
types/toposort/tslint.json
Normal file
3
types/toposort/tslint.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user