Skip to content

Commit

Permalink
docs ~ fix TS example to work with fully-specified imports and ts-node
Browse files Browse the repository at this point in the history
# Discussion

`ts-node`, for 'reasons', doesn't currently support the TypeScripts import "magic"
extension search logic. Discussion and experimentation is on-going and may be added in the
future.[^1] For now, as a working replacement, reference the CJS compiled/distributed code
directly instead of the TypeScript source code in the TS example.

# refs

[1]: TypeStrong/ts-node#783
  • Loading branch information
rivy committed Feb 8, 2021
1 parent ee0105b commit d9174be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eg/show-paths.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import osPaths from '../src';
import osPaths from '../dist/cjs/index.js'; // ## maint: [2021-02-07; rivy] await resolution of <https://github.com/TypeStrong/ts-node/issues/783> to return to direct TS import

/* eslint-disable no-console , functional/immutable-data , security/detect-object-injection, security-node/detect-crlf , @typescript-eslint/no-explicit-any */

Expand Down

0 comments on commit d9174be

Please sign in to comment.