mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 14:27:04 +00:00
Enable strictNullChecks
This commit is contained in:
Vendored
+1
-1
@@ -7,7 +7,7 @@
|
||||
export function safeLoad(str: string, opts?: LoadOptions): any;
|
||||
export function load(str: string, opts?: LoadOptions): any;
|
||||
|
||||
export class Type implements TypeConstructorOptions {
|
||||
export class Type {
|
||||
constructor(tag: string, opts?: TypeConstructorOptions);
|
||||
kind: 'sequence' | 'scalar' | 'mapping' | null;
|
||||
resolve(data: any): boolean;
|
||||
|
||||
@@ -87,19 +87,19 @@ dumpOpts = {
|
||||
// $ExpectType Type
|
||||
new yaml.Type(str, typeConstructorOptions);
|
||||
|
||||
// $ExpectType "sequence" | "scalar" | "mapping"
|
||||
// $ExpectType "sequence" | "scalar" | "mapping" | null
|
||||
type.kind;
|
||||
// $ExpectType (data: any) => boolean
|
||||
type.resolve;
|
||||
// $ExpectType (data: any) => any
|
||||
type.construct;
|
||||
// $ExpectType object
|
||||
// $ExpectType object | null
|
||||
type.instanceOf;
|
||||
// $ExpectType string
|
||||
// $ExpectType string | null
|
||||
type.predicate;
|
||||
// $ExpectType ((data: object) => any) | { [x: string]: (data: object) => any; }
|
||||
// $ExpectType ((data: object) => any) | { [x: string]: (data: object) => any; } | null
|
||||
type.represent;
|
||||
// $ExpectType string
|
||||
// $ExpectType string | null
|
||||
type.defaultStyle;
|
||||
// $ExpectType { [x: string]: any; }
|
||||
type.styleAliases;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
@@ -20,4 +20,4 @@
|
||||
"index.d.ts",
|
||||
"js-yaml-tests.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user