-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
789 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
122 changes: 122 additions & 0 deletions
122
tests/baselines/reference/returnStatementNoAsiAfterTransform(target=es5).js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
//// [tests/cases/conformance/statements/returnStatements/returnStatementNoAsiAfterTransform.ts] //// | ||
|
||
//// [returnStatementNoAsiAfterTransform.ts] | ||
declare var a: any; | ||
|
||
function t1() { | ||
return ( | ||
// comment | ||
a as any | ||
); | ||
} | ||
function t2() { | ||
return ( | ||
// comment | ||
a as any | ||
) + 1; | ||
} | ||
function t3() { | ||
return ( | ||
// comment | ||
a as any | ||
) ? 0 : 1; | ||
} | ||
function t4() { | ||
return ( | ||
// comment | ||
a as any | ||
).b; | ||
} | ||
function t5() { | ||
return ( | ||
// comment | ||
a as any | ||
)[a]; | ||
} | ||
function t6() { | ||
return ( | ||
// comment | ||
a as any | ||
)(); | ||
} | ||
function t7() { | ||
return ( | ||
// comment | ||
a as any | ||
)``; | ||
} | ||
function t8() { | ||
return ( | ||
// comment | ||
a as any | ||
) as any; | ||
} | ||
function t9() { | ||
return ( | ||
// comment | ||
a as any | ||
) satisfies any; | ||
} | ||
function t10() { | ||
return ( | ||
// comment | ||
a as any | ||
)!; | ||
} | ||
|
||
|
||
//// [returnStatementNoAsiAfterTransform.js] | ||
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { | ||
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } | ||
return cooked; | ||
}; | ||
function t1() { | ||
return ( | ||
// comment | ||
a); | ||
} | ||
function t2() { | ||
return ( | ||
// comment | ||
a) + 1; | ||
} | ||
function t3() { | ||
return ( | ||
// comment | ||
a) ? 0 : 1; | ||
} | ||
function t4() { | ||
return ( | ||
// comment | ||
a).b; | ||
} | ||
function t5() { | ||
return ( | ||
// comment | ||
a)[a]; | ||
} | ||
function t6() { | ||
return ( | ||
// comment | ||
a)(); | ||
} | ||
function t7() { | ||
return ( | ||
// comment | ||
a)(__makeTemplateObject([""], [""])); | ||
} | ||
function t8() { | ||
return ( | ||
// comment | ||
a); | ||
} | ||
function t9() { | ||
return ( | ||
// comment | ||
a); | ||
} | ||
function t10() { | ||
return ( | ||
// comment | ||
a); | ||
} |
118 changes: 118 additions & 0 deletions
118
tests/baselines/reference/returnStatementNoAsiAfterTransform(target=esnext).js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
//// [tests/cases/conformance/statements/returnStatements/returnStatementNoAsiAfterTransform.ts] //// | ||
|
||
//// [returnStatementNoAsiAfterTransform.ts] | ||
declare var a: any; | ||
|
||
function t1() { | ||
return ( | ||
// comment | ||
a as any | ||
); | ||
} | ||
function t2() { | ||
return ( | ||
// comment | ||
a as any | ||
) + 1; | ||
} | ||
function t3() { | ||
return ( | ||
// comment | ||
a as any | ||
) ? 0 : 1; | ||
} | ||
function t4() { | ||
return ( | ||
// comment | ||
a as any | ||
).b; | ||
} | ||
function t5() { | ||
return ( | ||
// comment | ||
a as any | ||
)[a]; | ||
} | ||
function t6() { | ||
return ( | ||
// comment | ||
a as any | ||
)(); | ||
} | ||
function t7() { | ||
return ( | ||
// comment | ||
a as any | ||
)``; | ||
} | ||
function t8() { | ||
return ( | ||
// comment | ||
a as any | ||
) as any; | ||
} | ||
function t9() { | ||
return ( | ||
// comment | ||
a as any | ||
) satisfies any; | ||
} | ||
function t10() { | ||
return ( | ||
// comment | ||
a as any | ||
)!; | ||
} | ||
|
||
|
||
//// [returnStatementNoAsiAfterTransform.js] | ||
function t1() { | ||
return ( | ||
// comment | ||
a); | ||
} | ||
function t2() { | ||
return ( | ||
// comment | ||
a) + 1; | ||
} | ||
function t3() { | ||
return ( | ||
// comment | ||
a) ? 0 : 1; | ||
} | ||
function t4() { | ||
return ( | ||
// comment | ||
a).b; | ||
} | ||
function t5() { | ||
return ( | ||
// comment | ||
a)[a]; | ||
} | ||
function t6() { | ||
return ( | ||
// comment | ||
a)(); | ||
} | ||
function t7() { | ||
return ( | ||
// comment | ||
a) ``; | ||
} | ||
function t8() { | ||
return ( | ||
// comment | ||
a); | ||
} | ||
function t9() { | ||
return ( | ||
// comment | ||
a); | ||
} | ||
function t10() { | ||
return ( | ||
// comment | ||
a); | ||
} |
Oops, something went wrong.