diff --git a/index.ts b/index.ts index 178ccdc9ecb04d61269e97c493e6e81e3ef903f6..80a085f2f4cffab3ac5965721b346ce8783f5efa 100644 --- a/index.ts +++ b/index.ts @@ -24,3 +24,8 @@ let names: Array = ["Alice", "Bob", "Charlie"]; // 元组类型注释 let tuple: [string, number] = ["Alice", 30]; + + +// 布尔值(Boolean) +let isDone: string ; +console.log(isDone); diff --git a/tsconfig.json b/tsconfig.json index 32f76b79c6f36e9bed32de3435d3dee31bcae30d..f2b783cdc6369ed768c7dd2218a613c989e731f4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,7 +25,7 @@ /* Strict Type-Checking Options */ "strict": true, /* Enable all strict type-checking options. */ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ + "strictNullChecks": false, /* Enable strict null checks. */ // "strictFunctionTypes": true, /* Enable strict checking of function types. */ // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */