mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
fix strictNullChecks
workstream:
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import * as tern from "tern";
|
||||
|
||||
const server: tern.Server = null;
|
||||
const server: tern.Server = null as any;
|
||||
|
||||
server.request({
|
||||
query: {
|
||||
@@ -9,7 +9,7 @@ server.request({
|
||||
end: 0
|
||||
}
|
||||
}, (error, response) => {
|
||||
if (response.isProperty) {
|
||||
if (response && response.isProperty) {
|
||||
//
|
||||
}
|
||||
});
|
||||
@@ -17,7 +17,7 @@ server.request({
|
||||
server.request({
|
||||
}, (error, response) => {
|
||||
// $ExpectError
|
||||
if (response.isProperty) {
|
||||
if (response && response.isProperty) {
|
||||
//
|
||||
}
|
||||
});
|
||||
@@ -40,7 +40,7 @@ server.request({
|
||||
type: "someUnknownType"
|
||||
}
|
||||
}, (error, response) => {
|
||||
if (response.abc) {
|
||||
if (response && response.abc) {
|
||||
//
|
||||
}
|
||||
});
|
||||
@@ -49,7 +49,7 @@ server.request({
|
||||
query: undefined
|
||||
}, (error, response) => {
|
||||
// $ExpectError
|
||||
if (response.isProperty) {
|
||||
if (response && response.isProperty) {
|
||||
//
|
||||
}
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
|
||||
Reference in New Issue
Block a user