Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Accept new baselines
  • Loading branch information
ahejlsberg committed Dec 9, 2020
commit e88ceca03f4717253fd6b099aeddc292a89558c5
2 changes: 1 addition & 1 deletion tests/baselines/reference/TemplateExpression1.types
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=== tests/cases/conformance/es6/templates/TemplateExpression1.ts ===
var v = `foo ${ a
>v : string
>`foo ${ a : string
>`foo ${ a : `foo ${any}`
>a : any

2 changes: 1 addition & 1 deletion tests/baselines/reference/accessorsOverrideProperty2.types
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Derived extends Base {
>console.log : (...data: any[]) => void
>console : Console
>log : (...data: any[]) => void
>`x was set to ${value}` : string
>`x was set to ${value}` : `x was set to ${number}`
>value : number
}

Expand Down
5 changes: 5 additions & 0 deletions tests/baselines/reference/api/tsserverlibrary.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2484,6 +2484,8 @@ declare namespace ts {
Literal = 2944,
Unit = 109440,
StringOrNumberLiteral = 384,
StringLikeLiteral = 134217856,
FreshableLiteral = 134220672,
PossiblyFalsy = 117724,
StringLike = 402653316,
NumberLike = 296,
Expand All @@ -2509,6 +2511,7 @@ declare namespace ts {
aliasSymbol?: Symbol;
aliasTypeArguments?: readonly Type[];
}
export type FreshableType = FreshableLiteralType | FreshableIntrinsicType;
export interface LiteralType extends Type {
value: string | number | PseudoBigInt;
freshType: LiteralType;
Expand Down Expand Up @@ -2653,6 +2656,8 @@ declare namespace ts {
export interface TemplateLiteralType extends InstantiableType {
texts: readonly string[];
types: readonly Type[];
freshType: TemplateLiteralType;
regularType: TemplateLiteralType;
}
export interface StringMappingType extends InstantiableType {
symbol: Symbol;
Expand Down
5 changes: 5 additions & 0 deletions tests/baselines/reference/api/typescript.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2484,6 +2484,8 @@ declare namespace ts {
Literal = 2944,
Unit = 109440,
StringOrNumberLiteral = 384,
StringLikeLiteral = 134217856,
FreshableLiteral = 134220672,
PossiblyFalsy = 117724,
StringLike = 402653316,
NumberLike = 296,
Expand All @@ -2509,6 +2511,7 @@ declare namespace ts {
aliasSymbol?: Symbol;
aliasTypeArguments?: readonly Type[];
}
export type FreshableType = FreshableLiteralType | FreshableIntrinsicType;
export interface LiteralType extends Type {
value: string | number | PseudoBigInt;
freshType: LiteralType;
Expand Down Expand Up @@ -2653,6 +2656,8 @@ declare namespace ts {
export interface TemplateLiteralType extends InstantiableType {
texts: readonly string[];
types: readonly Type[];
freshType: TemplateLiteralType;
regularType: TemplateLiteralType;
}
export interface StringMappingType extends InstantiableType {
symbol: Symbol;
Expand Down
12 changes: 6 additions & 6 deletions tests/baselines/reference/asOperator3.types
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ declare function tag(...x: any[]): any;

var a = `${123 + 456 as number}`;
>a : string
>`${123 + 456 as number}` : string
>`${123 + 456 as number}` : `${number}`
>123 + 456 as number : number
>123 + 456 : number
>123 : 123
>456 : 456

var b = `leading ${123 + 456 as number}`;
>b : string
>`leading ${123 + 456 as number}` : string
>`leading ${123 + 456 as number}` : `leading ${number}`
>123 + 456 as number : number
>123 + 456 : number
>123 : 123
>456 : 456

var c = `${123 + 456 as number} trailing`;
>c : string
>`${123 + 456 as number} trailing` : string
>`${123 + 456 as number} trailing` : `${number} trailing`
>123 + 456 as number : number
>123 + 456 : number
>123 : 123
Expand All @@ -30,7 +30,7 @@ var c = `${123 + 456 as number} trailing`;
var d = `Hello ${123} World` as string;
>d : string
>`Hello ${123} World` as string : string
>`Hello ${123} World` : string
>`Hello ${123} World` : "Hello 123 World"
>123 : 123

var e = `Hello` as string;
Expand All @@ -43,15 +43,15 @@ var f = 1 + `${1} end of string` as string;
>1 + `${1} end of string` as string : string
>1 + `${1} end of string` : string
>1 : 1
>`${1} end of string` : string
>`${1} end of string` : "1 end of string"
>1 : 1

var g = tag `Hello ${123} World` as string;
>g : string
>tag `Hello ${123} World` as string : string
>tag `Hello ${123} World` : any
>tag : (...x: any[]) => any
>`Hello ${123} World` : string
>`Hello ${123} World` : "Hello 123 World"
>123 : 123

var h = tag `Hello` as string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let n = Math.random();

let s = `${n}`;
>s : string
>`${n}` : string
>`${n}` : `${number}`
>n : number

const numericIndex = { [n]: 1 };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ var v = {

[`hello ${a} bye`]() { }
>[`hello ${a} bye`] : () => void
>`hello ${a} bye` : string
>`hello ${a} bye` : `hello ${any} bye`
>a : any
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ var v = {

[`hello ${a} bye`]() { }
>[`hello ${a} bye`] : () => void
>`hello ${a} bye` : string
>`hello ${a} bye` : `hello ${any} bye`
>a : any
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ var v = {

get [`hello ${a} bye`]() { return 0; }
>[`hello ${a} bye`] : number
>`hello ${a} bye` : string
>`hello ${a} bye` : `hello ${any} bye`
>a : any
>0 : 0
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ var v = {

get [`hello ${a} bye`]() { return 0; }
>[`hello ${a} bye`] : number
>`hello ${a} bye` : string
>`hello ${a} bye` : `hello ${any} bye`
>a : any
>0 : 0
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class C {

static [`hello ${a} bye`] = 0
>[`hello ${a} bye`] : number
>`hello ${a} bye` : string
>`hello ${a} bye` : `hello ${any} bye`
>a : any
>0 : 0
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class C {

static [`hello ${a} bye`] = 0
>[`hello ${a} bye`] : number
>`hello ${a} bye` : string
>`hello ${a} bye` : `hello ${any} bye`
>a : any
>0 : 0
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ class C {

static [`hello ${a} bye`]() { }
>[`hello ${a} bye`] : () => void
>`hello ${a} bye` : string
>`hello ${a} bye` : `hello ${any} bye`
>a : any
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ class C {

static [`hello ${a} bye`]() { }
>[`hello ${a} bye`] : () => void
>`hello ${a} bye` : string
>`hello ${a} bye` : `hello ${any} bye`
>a : any
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class C {

get [`hello ${a} bye`]() { return 0; }
>[`hello ${a} bye`] : number
>`hello ${a} bye` : string
>`hello ${a} bye` : `hello ${any} bye`
>a : any
>0 : 0
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class C {

get [`hello ${a} bye`]() { return 0; }
>[`hello ${a} bye`] : number
>`hello ${a} bye` : string
>`hello ${a} bye` : `hello ${any} bye`
>a : any
>0 : 0
}
2 changes: 1 addition & 1 deletion tests/baselines/reference/computedPropertyNames4_ES5.types
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ var v = {

[`hello ${a} bye`]: 0
>[`hello ${a} bye`] : number
>`hello ${a} bye` : string
>`hello ${a} bye` : `hello ${any} bye`
>a : any
>0 : 0
}
2 changes: 1 addition & 1 deletion tests/baselines/reference/computedPropertyNames4_ES6.types
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ var v = {

[`hello ${a} bye`]: 0
>[`hello ${a} bye`] : number
>`hello ${a} bye` : string
>`hello ${a} bye` : `hello ${any} bye`
>a : any
>0 : 0
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class HelloWorld {
>Log.info : (msg: string) => void
>Log : { info(msg: string): void; }
>info : (msg: string) => void
>`Hello ${this.name}` : string
>`Hello ${this.name}` : `Hello ${string}`
>this.name : string
>this : this
>name : string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function register(kind: string): void | never {
throw new Error(`Class with kind "${kind}" is already registered.`);
>new Error(`Class with kind "${kind}" is already registered.`) : Error
>Error : ErrorConstructor
>`Class with kind "${kind}" is already registered.` : string
>`Class with kind "${kind}" is already registered.` : `Class with kind "${string}" is already registered.`
>kind : string
}
kindCache[kind] = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const Parent: SFC<Props> = ({

const Child: SFC<Props> = ({
>Child : SFC<Props>
>({ children, name = "Artemis", ...props}) => `name: ${name} props: ${JSON.stringify(props)}` : ({ children, name, ...props }: Props & { children?: any; }) => string
>({ children, name = "Artemis", ...props}) => `name: ${name} props: ${JSON.stringify(props)}` : ({ children, name, ...props }: Props & { children?: any; }) => `name: Apollo props: ${string}` | `name: Artemis props: ${string}` | `name: Dionysus props: ${string}` | `name: Persephone props: ${string}`

children,
>children : any
Expand All @@ -47,7 +47,7 @@ const Child: SFC<Props> = ({
>props : {}

}) => `name: ${name} props: ${JSON.stringify(props)}`;
>`name: ${name} props: ${JSON.stringify(props)}` : string
>`name: ${name} props: ${JSON.stringify(props)}` : `name: Apollo props: ${string}` | `name: Artemis props: ${string}` | `name: Dionysus props: ${string}` | `name: Persephone props: ${string}`
>name : "Apollo" | "Artemis" | "Dionysus" | "Persephone"
>JSON.stringify(props) : string
>JSON.stringify : { (value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string; (value: any, replacer?: (string | number)[] | null | undefined, space?: string | number | undefined): string; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ class C2 extends C1<number, string, boolean> {
>C1 : C1<number, string, boolean>

public doSomethingWithSuperProperties() {
>doSomethingWithSuperProperties : () => string
>doSomethingWithSuperProperties : () => `${any} ${any} ${any}`

return `${this.a} ${this.b} ${this.c}`;
>`${this.a} ${this.b} ${this.c}` : string
>`${this.a} ${this.b} ${this.c}` : `${any} ${any} ${any}`
>this.a : any
>this : this
>a : any
Expand Down
Loading