mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
15 lines
409 B
Plaintext
15 lines
409 B
Plaintext
foo.ts(2,7): error TS2322: Type 'undefined' is not assignable to type 'string'.
|
|
|
|
|
|
==== tsconfig.json (0 errors) ====
|
|
{
|
|
"compilerOptions": {
|
|
"target": "es2020",
|
|
"strictNullChecks": true
|
|
}
|
|
}
|
|
==== foo.ts (1 errors) ====
|
|
export {};
|
|
const x: string = undefined;
|
|
~
|
|
!!! error TS2322: Type 'undefined' is not assignable to type 'string'. |