diff --git a/types/toposort/index.d.ts b/types/toposort/index.d.ts index 8da78b7d11..c2c9940c3a 100644 --- a/types/toposort/index.d.ts +++ b/types/toposort/index.d.ts @@ -3,4 +3,5 @@ // Definitions by: Daniel Byrne // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export default function toposort(graph: ReadonlyArray<[string, string]>): ReadonlyArray; +declare function toposort(graph: ReadonlyArray<[string, string]>): ReadonlyArray; +export = toposort; diff --git a/types/toposort/toposort-tests.ts b/types/toposort/toposort-tests.ts index 201277fefa..84f554033b 100644 --- a/types/toposort/toposort-tests.ts +++ b/types/toposort/toposort-tests.ts @@ -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