diff --git a/tests/baselines/reference/modifierParenCast.js b/tests/baselines/reference/modifierParenCast.js new file mode 100644 index 0000000000000..d4026dcb3d4df --- /dev/null +++ b/tests/baselines/reference/modifierParenCast.js @@ -0,0 +1,23 @@ +//// [modifierParenCast.ts] +let readonly: any = undefined; +let override: any = undefined; +let out: any = undefined; +let declare: any = undefined; + +export const a = (readonly as number); +export const b = (override as number); +export const c = (out as number); +export const d = (declare as number); + +//// [modifierParenCast.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = exports.c = exports.b = exports.a = void 0; +var readonly = undefined; +var override = undefined; +var out = undefined; +var declare = undefined; +exports.a = readonly; +exports.b = override; +exports.c = out; +exports.d = declare; diff --git a/tests/baselines/reference/modifierParenCast.symbols b/tests/baselines/reference/modifierParenCast.symbols new file mode 100644 index 0000000000000..abf03d6c41a3e --- /dev/null +++ b/tests/baselines/reference/modifierParenCast.symbols @@ -0,0 +1,33 @@ +=== tests/cases/compiler/modifierParenCast.ts === +let readonly: any = undefined; +>readonly : Symbol(readonly, Decl(modifierParenCast.ts, 0, 3)) +>undefined : Symbol(undefined) + +let override: any = undefined; +>override : Symbol(override, Decl(modifierParenCast.ts, 1, 3)) +>undefined : Symbol(undefined) + +let out: any = undefined; +>out : Symbol(out, Decl(modifierParenCast.ts, 2, 3)) +>undefined : Symbol(undefined) + +let declare: any = undefined; +>declare : Symbol(declare, Decl(modifierParenCast.ts, 3, 3)) +>undefined : Symbol(undefined) + +export const a = (readonly as number); +>a : Symbol(a, Decl(modifierParenCast.ts, 5, 12)) +>readonly : Symbol(readonly, Decl(modifierParenCast.ts, 0, 3)) + +export const b = (override as number); +>b : Symbol(b, Decl(modifierParenCast.ts, 6, 12)) +>override : Symbol(override, Decl(modifierParenCast.ts, 1, 3)) + +export const c = (out as number); +>c : Symbol(c, Decl(modifierParenCast.ts, 7, 12)) +>out : Symbol(out, Decl(modifierParenCast.ts, 2, 3)) + +export const d = (declare as number); +>d : Symbol(d, Decl(modifierParenCast.ts, 8, 12)) +>declare : Symbol(declare, Decl(modifierParenCast.ts, 3, 3)) + diff --git a/tests/baselines/reference/modifierParenCast.types b/tests/baselines/reference/modifierParenCast.types new file mode 100644 index 0000000000000..09367b30fca30 --- /dev/null +++ b/tests/baselines/reference/modifierParenCast.types @@ -0,0 +1,41 @@ +=== tests/cases/compiler/modifierParenCast.ts === +let readonly: any = undefined; +>readonly : any +>undefined : undefined + +let override: any = undefined; +>override : any +>undefined : undefined + +let out: any = undefined; +>out : any +>undefined : undefined + +let declare: any = undefined; +>declare : any +>undefined : undefined + +export const a = (readonly as number); +>a : number +>(readonly as number) : number +>readonly as number : number +>readonly : any + +export const b = (override as number); +>b : number +>(override as number) : number +>override as number : number +>override : any + +export const c = (out as number); +>c : number +>(out as number) : number +>out as number : number +>out : any + +export const d = (declare as number); +>d : number +>(declare as number) : number +>declare as number : number +>declare : any + diff --git a/tests/baselines/reference/overrideParenVariable.js b/tests/baselines/reference/overrideParenVariable.js deleted file mode 100644 index 22eb85b7c3122..0000000000000 --- a/tests/baselines/reference/overrideParenVariable.js +++ /dev/null @@ -1,8 +0,0 @@ -//// [overrideParenVariable.ts] - -let override: any; -export const a = (override as number); - -//// [overrideParenVariable.js] - -export const a = override; diff --git a/tests/baselines/reference/overrideParenVariable.symbols b/tests/baselines/reference/overrideParenVariable.symbols deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/tests/baselines/reference/overrideParenVariable.types b/tests/baselines/reference/overrideParenVariable.types deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/tests/cases/compiler/modifierParenCast.ts b/tests/cases/compiler/modifierParenCast.ts new file mode 100644 index 0000000000000..c2b09f54b687e --- /dev/null +++ b/tests/cases/compiler/modifierParenCast.ts @@ -0,0 +1,11 @@ +//@target: ES5 + +let readonly: any = undefined; +let override: any = undefined; +let out: any = undefined; +let declare: any = undefined; + +export const a = (readonly as number); +export const b = (override as number); +export const c = (out as number); +export const d = (declare as number); \ No newline at end of file diff --git a/tests/cases/compiler/readonlyParenCast.ts b/tests/cases/compiler/readonlyParenCast.ts deleted file mode 100644 index b89372d3924f7..0000000000000 --- a/tests/cases/compiler/readonlyParenCast.ts +++ /dev/null @@ -1,5 +0,0 @@ -//@target: ES5 - -let readonly: any; - -export const a = (readonly as number); \ No newline at end of file