Skip to content

Commit

Permalink
Use all modifiers test
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidSouther committed May 9, 2022
1 parent 3dd9ef4 commit 958adfc
Show file tree
Hide file tree
Showing 8 changed files with 108 additions and 13 deletions.
23 changes: 23 additions & 0 deletions tests/baselines/reference/modifierParenCast.js
Original file line number Diff line number Diff line change
@@ -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;
33 changes: 33 additions & 0 deletions tests/baselines/reference/modifierParenCast.symbols
Original file line number Diff line number Diff line change
@@ -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))

41 changes: 41 additions & 0 deletions tests/baselines/reference/modifierParenCast.types
Original file line number Diff line number Diff line change
@@ -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

8 changes: 0 additions & 8 deletions tests/baselines/reference/overrideParenVariable.js

This file was deleted.

Empty file.
Empty file.
11 changes: 11 additions & 0 deletions tests/cases/compiler/modifierParenCast.ts
Original file line number Diff line number Diff line change
@@ -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);
5 changes: 0 additions & 5 deletions tests/cases/compiler/readonlyParenCast.ts

This file was deleted.

0 comments on commit 958adfc

Please sign in to comment.