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
1f4678fb27
commit
86f0182f17
3
types/toposort/index.d.ts
vendored
3
types/toposort/index.d.ts
vendored
@ -3,4 +3,5 @@
|
||||
// Definitions by: Daniel Byrne <https://github.com/danwbyrne>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export default function toposort(graph: ReadonlyArray<[string, string]>): ReadonlyArray<string>;
|
||||
declare function toposort(graph: ReadonlyArray<[string, string]>): ReadonlyArray<string>;
|
||||
export = toposort;
|
||||
|
||||
@ -1,18 +1,9 @@
|
||||
import toposort from 'toposort';
|
||||
import toposort = require('toposort');
|
||||
|
||||
const testGraph: ReadonlyArray<[string, string]> = [
|
||||
[
|
||||
'string1',
|
||||
'string2',
|
||||
],
|
||||
[
|
||||
'string2',
|
||||
'string3',
|
||||
],
|
||||
[
|
||||
'string3',
|
||||
'string1',
|
||||
],
|
||||
["string1", "string2"],
|
||||
["string2", "string3"],
|
||||
["string3", "string1"]
|
||||
];
|
||||
|
||||
// $ExpectType ReadonlyArray<string>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user