-
-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ow.bigint
#212
Add ow.bigint
#212
Conversation
@@ -2,9 +2,9 @@ | |||
"extends": "@sindresorhus/tsconfig", | |||
"compilerOptions": { | |||
"outDir": "dist", | |||
"target": "es2018", | |||
"target": "es2020", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change because test failed.
Uncaught exception in test/bigint.ts
test/bigint.ts:12:6 - error TS2737: BigInt literals are not available when targeting lower than ES2020.
12 ow(9007199254740991n, ow.bigint);
~~~~~~~~~~~~~~~~~
test/types.ts
Outdated
@@ -106,6 +106,8 @@ function typeTests(value: unknown): Array<(() => void)> { | |||
const tests: Tests = { | |||
array: expect => expect.toBeArray(), | |||
arrayBuffer: expect => expect.toEqualTypeOf<ArrayBuffer>(), | |||
// eslint-disable-next-line node/no-unsupported-features/es-builtins, node/no-unsupported-features/es-syntax | |||
bigint: expect => expect.toEqualTypeOf<BigInt>(10n as never), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what the screenshot is trying to illustrate? But it's better to use @ts-expect-error
if there's really no way to make it work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I use @ts-expect-error
. 83657b6
I don't know why only node10,12 fails the test because of SyntaxError. |
It's fine. I'm going to drop Node.js 10 support after merging this PR. |
Resolve: #54