Skip to content

Commit

Permalink
es2020
Browse files Browse the repository at this point in the history
  • Loading branch information
seriouscoderone committed Jul 11, 2023
1 parent 65a708d commit bd6522b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"style:fix": "yarn style --fix",
"verify": "yarn style && yarn test",
"test": "yarn test:unit",
"test:unit": "c8 -r html -r text -r lcov --exclude src/test uvu -r tsm src/test",
"test:unit2": "tsc && c8 -r html -r text -r lcov --exclude dist/test uvu dist/test -i \\d+.ts"
"test:unit": "c8 -r html -r text -r lcov --exclude src/test uvu -r tsm src/test"
},
"type": "module",
"types": "dist/main/index.d.ts",
Expand Down
6 changes: 4 additions & 2 deletions src/main/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
export { toposortExtra } from './extra.js'
export { toposort as array, toposortDefault as default } from './toposort.js'
export * from "./extra.js";
export * from "./toposort.js";

export {toposortDefault as default} from "./toposort.js";
4 changes: 3 additions & 1 deletion src/main/toposort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function visitFactory(visited: Record<string, boolean>, outgoingEdges: Map<unkno
return visit
}

export function toposortCore(nodes: unknown[], edges: unknown[][]) {
function toposortCore(nodes: unknown[], edges: unknown[][]) {
const cursor = nodes.length
let i = cursor
const sorted = [cursor]
Expand Down Expand Up @@ -67,3 +67,5 @@ export function toposortDefault(edges: unknown[][]) {

toposortDefault.array = toposort

export default toposortDefault

4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */

/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
"module": "ES2020", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
"moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
Expand Down

0 comments on commit bd6522b

Please sign in to comment.