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:
1 parent
5f7e1265c9
commit
8ef90e7539
8 files changed
+22
-22
No files matched your search
@@ -76,7 +76,7 @@ if (isNodeList(sourceObj)) {
|
||||
if (isHTMLCollection(sourceObj)) {
|
||||
>isHTMLCollection(sourceObj) : boolean
|
||||
>isHTMLCollection : (sourceObj: any) => sourceObj is HTMLCollection
|
||||
>sourceObj : NodeList | HTMLCollection | { a: string; }
|
||||
>sourceObj : EventTargetLike
|
||||
|
||||
sourceObj.length;
|
||||
>sourceObj.length : number
|
||||
@@ -88,7 +88,7 @@ if (isNodeList(sourceObj) || isHTMLCollection(sourceObj)) {
|
||||
>isNodeList(sourceObj) || isHTMLCollection(sourceObj) : boolean
|
||||
>isNodeList(sourceObj) : boolean
|
||||
>isNodeList : (sourceObj: any) => sourceObj is NodeList
|
||||
>sourceObj : NodeList | HTMLCollection | { a: string; }
|
||||
>sourceObj : EventTargetLike
|
||||
>isHTMLCollection(sourceObj) : boolean
|
||||
>isHTMLCollection : (sourceObj: any) => sourceObj is HTMLCollection
|
||||
>sourceObj : { a: string; }
|
||||
|
||||
@@ -86,7 +86,7 @@ function f2() {
|
||||
>Array.isArray : (arg: any) => arg is any[]
|
||||
>Array : ArrayConstructor
|
||||
>isArray : (arg: any) => arg is any[]
|
||||
>elOrA : string | false | (string | false)[]
|
||||
>elOrA : (string | false) | (string | false)[]
|
||||
>elOrA : (string | false)[]
|
||||
>[elOrA] : (string | false)[]
|
||||
>elOrA : string | false
|
||||
|
||||
@@ -59,7 +59,7 @@ if (elementA instanceof FileMatch && elementB instanceof FileMatch) {
|
||||
} else if (elementA instanceof Match && elementB instanceof Match) {
|
||||
>elementA instanceof Match && elementB instanceof Match : boolean
|
||||
>elementA instanceof Match : boolean
|
||||
>elementA : Match | FileMatch
|
||||
>elementA : FileMatchOrMatch
|
||||
>Match : typeof Match
|
||||
>elementB instanceof Match : boolean
|
||||
>elementB : FileMatchOrMatch
|
||||
|
||||
@@ -22,7 +22,7 @@ if (x === "") {
|
||||
|
||||
if (x !== "") {
|
||||
>x !== "" : boolean
|
||||
>x : "" | "foo"
|
||||
>x : T
|
||||
>"" : ""
|
||||
|
||||
let b = x;
|
||||
@@ -32,7 +32,7 @@ if (x !== "") {
|
||||
|
||||
if (x == "") {
|
||||
>x == "" : boolean
|
||||
>x : "" | "foo"
|
||||
>x : T
|
||||
>"" : ""
|
||||
|
||||
let c = x;
|
||||
@@ -42,7 +42,7 @@ if (x == "") {
|
||||
|
||||
if (x != "") {
|
||||
>x != "" : boolean
|
||||
>x : "" | "foo"
|
||||
>x : T
|
||||
>"" : ""
|
||||
|
||||
let d = x;
|
||||
@@ -51,7 +51,7 @@ if (x != "") {
|
||||
}
|
||||
|
||||
if (x) {
|
||||
>x : "" | "foo"
|
||||
>x : T
|
||||
|
||||
let e = x;
|
||||
>e : "foo"
|
||||
@@ -60,17 +60,17 @@ if (x) {
|
||||
|
||||
if (!x) {
|
||||
>!x : boolean
|
||||
>x : "" | "foo"
|
||||
>x : T
|
||||
|
||||
let f = x;
|
||||
>f : "" | "foo"
|
||||
>x : "" | "foo"
|
||||
>f : T
|
||||
>x : T
|
||||
}
|
||||
|
||||
if (!!x) {
|
||||
>!!x : boolean
|
||||
>!x : boolean
|
||||
>x : "" | "foo"
|
||||
>x : T
|
||||
|
||||
let g = x;
|
||||
>g : "foo"
|
||||
@@ -81,9 +81,9 @@ if (!!!x) {
|
||||
>!!!x : boolean
|
||||
>!!x : boolean
|
||||
>!x : boolean
|
||||
>x : "" | "foo"
|
||||
>x : T
|
||||
|
||||
let h = x;
|
||||
>h : "" | "foo"
|
||||
>x : "" | "foo"
|
||||
>h : T
|
||||
>x : T
|
||||
}
|
||||
@@ -47,7 +47,7 @@ if (!kindIs(x, "B")) {
|
||||
>!kindIs(x, "B") : boolean
|
||||
>kindIs(x, "B") : boolean
|
||||
>kindIs : { (kind: Kind, is: "A"): kind is "A"; (kind: Kind, is: "B"): kind is "B"; }
|
||||
>x : "A" | "B"
|
||||
>x : Kind
|
||||
>"B" : "B"
|
||||
|
||||
let c = x;
|
||||
|
||||
@@ -630,14 +630,14 @@ function notallowed(arg: number) {
|
||||
|
||||
state.tag;
|
||||
>state.tag : "one" | "two" | "three"
|
||||
>state : { tag: "one"; } | { tag: "two"; } | { tag: "three"; }
|
||||
>state : State
|
||||
>tag : "one" | "two" | "three"
|
||||
|
||||
if (state.tag !== "one" && state.tag !== "two") {
|
||||
>state.tag !== "one" && state.tag !== "two" : boolean
|
||||
>state.tag !== "one" : boolean
|
||||
>state.tag : "one" | "two" | "three"
|
||||
>state : { tag: "one"; } | { tag: "two"; } | { tag: "three"; }
|
||||
>state : State
|
||||
>tag : "one" | "two" | "three"
|
||||
>"one" : "one"
|
||||
>state.tag !== "two" : boolean
|
||||
|
||||
@@ -53,7 +53,7 @@ export function fn<r>(makeSome: () => r): void {
|
||||
>cond : boolean
|
||||
|
||||
result; // Some<r> | None
|
||||
>result : None | Some<r>
|
||||
>result : Optional<r>
|
||||
|
||||
result = someFrom(isSome(result) ? result.some : makeSome());
|
||||
>result = someFrom(isSome(result) ? result.some : makeSome()) : { some: r; }
|
||||
@@ -63,7 +63,7 @@ export function fn<r>(makeSome: () => r): void {
|
||||
>isSome(result) ? result.some : makeSome() : r
|
||||
>isSome(result) : boolean
|
||||
>isSome : <a>(value: Optional<a>) => value is Some<a>
|
||||
>result : None | Some<r>
|
||||
>result : Optional<r>
|
||||
>result.some : r
|
||||
>result : Some<r>
|
||||
>some : r
|
||||
|
||||
@@ -92,9 +92,9 @@ class SomeClass2 {
|
||||
let n: number = this.state?.data; // This should be an error
|
||||
>n : number
|
||||
>this.state?.data : string | number
|
||||
>this.state : { type: "numberVariant"; data: number; } | { type: "stringVariant"; data: string; }
|
||||
>this.state : State
|
||||
>this : this
|
||||
>state : { type: "numberVariant"; data: number; } | { type: "stringVariant"; data: string; }
|
||||
>state : State
|
||||
>data : string | number
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user