File: bigIntWithTargetES3.errors.txt

package info (click to toggle)
node-typescript 4.8.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 523,068 kB
  • sloc: javascript: 1,735,777; makefile: 7; sh: 1
file content (21 lines) | stat: -rw-r--r-- 1,479 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
tests/cases/compiler/bigIntWithTargetES3.ts(5,22): error TS2737: BigInt literals are not available when targeting lower than ES2020.
tests/cases/compiler/bigIntWithTargetES3.ts(5,29): error TS2737: BigInt literals are not available when targeting lower than ES2020.
tests/cases/compiler/bigIntWithTargetES3.ts(5,39): error TS2737: BigInt literals are not available when targeting lower than ES2020.
tests/cases/compiler/bigIntWithTargetES3.ts(5,48): error TS2737: BigInt literals are not available when targeting lower than ES2020.


==== tests/cases/compiler/bigIntWithTargetES3.ts (4 errors) ====
    const normalNumber = 123; // should not error
    let bigintType: bigint; // should not error
    let bigintLiteralType: 123n; // should not error when used as type
    let bigintNegativeLiteralType: -123n; // should not error when used as type
    const bigintNumber = 123n * 0b1111n + 0o444n * 0x7fn; // each literal should error
                         ~~~~
!!! error TS2737: BigInt literals are not available when targeting lower than ES2020.
                                ~~~~~~~
!!! error TS2737: BigInt literals are not available when targeting lower than ES2020.
                                          ~~~~~~
!!! error TS2737: BigInt literals are not available when targeting lower than ES2020.
                                                   ~~~~~
!!! error TS2737: BigInt literals are not available when targeting lower than ES2020.