mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-14 16:56:06 -05:00
Add new error message for being possibly 'void'.
This commit is contained in:
@@ -25571,7 +25571,7 @@ namespace ts {
|
||||
function checkNonNullNonVoidType(type: Type, node: Node): Type {
|
||||
const nonNullType = checkNonNullType(type, node);
|
||||
if (nonNullType !== errorType && nonNullType.flags & TypeFlags.Void) {
|
||||
error(node, Diagnostics.Object_is_possibly_undefined);
|
||||
error(node, Diagnostics.Object_is_possibly_void);
|
||||
}
|
||||
return nonNullType;
|
||||
}
|
||||
|
||||
@@ -3059,6 +3059,11 @@
|
||||
"category": "Error",
|
||||
"code": 2796
|
||||
},
|
||||
"Object is possibly 'void'.": {
|
||||
"category": "Error",
|
||||
"code": 2797
|
||||
},
|
||||
|
||||
|
||||
"Import declaration '{0}' is using private name '{1}'.": {
|
||||
"category": "Error",
|
||||
|
||||
Reference in New Issue
Block a user