mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Accept new baselines
This commit is contained in:
@@ -5,9 +5,9 @@ tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(121,15): error T
|
||||
tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(122,15): error TS1228: A type predicate is only allowed in return type position for functions and methods.
|
||||
tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(123,15): error TS1228: A type predicate is only allowed in return type position for functions and methods.
|
||||
tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(124,15): error TS1228: A type predicate is only allowed in return type position for functions and methods.
|
||||
tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(129,5): error TS2775: Control flow effects of calls to assertion and never-returning functions are reflected only when every variable or property referenced in the function expression is declared with an explicit type annotation.
|
||||
tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(131,5): error TS2776: Control flow effects of calls to assertion and never-returning functions are reflected only when the function expression is an identifier or qualified-name.
|
||||
tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(133,5): error TS2775: Control flow effects of calls to assertion and never-returning functions are reflected only when every variable or property referenced in the function expression is declared with an explicit type annotation.
|
||||
tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(129,5): error TS2775: Assertions require every name in the call target to be declared with an explicit type annotation.
|
||||
tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(131,5): error TS2776: Assertions require the call target to be an identifier or qualified name.
|
||||
tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(133,5): error TS2775: Assertions require every name in the call target to be declared with an explicit type annotation.
|
||||
|
||||
|
||||
==== tests/cases/conformance/controlFlow/assertionTypePredicates1.ts (10 errors) ====
|
||||
@@ -155,15 +155,17 @@ tests/cases/conformance/controlFlow/assertionTypePredicates1.ts(133,5): error TS
|
||||
const assert = (value: unknown): asserts value => {}
|
||||
assert(typeof x === "string"); // Error
|
||||
~~~~~~
|
||||
!!! error TS2775: Control flow effects of calls to assertion and never-returning functions are reflected only when every variable or property referenced in the function expression is declared with an explicit type annotation.
|
||||
!!! error TS2775: Assertions require every name in the call target to be declared with an explicit type annotation.
|
||||
!!! related TS2728 tests/cases/conformance/controlFlow/assertionTypePredicates1.ts:128:11: 'assert' is declared here.
|
||||
const a = [assert];
|
||||
a[0](typeof x === "string"); // Error
|
||||
~~~~
|
||||
!!! error TS2776: Control flow effects of calls to assertion and never-returning functions are reflected only when the function expression is an identifier or qualified-name.
|
||||
!!! error TS2776: Assertions require the call target to be an identifier or qualified name.
|
||||
const t1 = new Test();
|
||||
t1.assert(typeof x === "string"); // Error
|
||||
~~~~~~~~~
|
||||
!!! error TS2775: Control flow effects of calls to assertion and never-returning functions are reflected only when every variable or property referenced in the function expression is declared with an explicit type annotation.
|
||||
!!! error TS2775: Assertions require every name in the call target to be declared with an explicit type annotation.
|
||||
!!! related TS2728 tests/cases/conformance/controlFlow/assertionTypePredicates1.ts:132:11: 't1' is declared here.
|
||||
const t2: Test = new Test();
|
||||
t2.assert(typeof x === "string");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user