Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
344d505
add support for Lift Template Literal Restriction
Kingwl May 1, 2018
6ef797f
rename file and improve comment and tests
Kingwl May 1, 2018
3932d20
fix NoSubstitutionTemplateLiteral support
Kingwl May 2, 2018
dbbcdae
Merge branch 'master' into Lift-Template-Literal-Restriction
Kingwl May 24, 2018
c642abe
Merge branch 'Lift-Template-Literal-Restriction' of https://github.co…
Kingwl May 25, 2018
e92b6bc
extract tagged template and add more test
Kingwl May 26, 2018
9bfb15b
Merge branch 'master' into Lift-Template-Literal-Restriction
Kingwl Jun 8, 2018
2c973b1
avoid useless parameter
Kingwl Jun 8, 2018
c2580ed
fix incorrect return node if cannot transform
Kingwl Jun 8, 2018
21c91d6
accept baseline
Kingwl Jun 8, 2018
cd46d9f
Merge branch 'master' into Lift-Template-Literal-Restriction
Kingwl Jun 30, 2018
472223b
correctly baseline
Kingwl Jun 30, 2018
789cbed
Merge branch 'master' of https://github.com/kingwl/typescript into Li…
Kingwl Aug 28, 2018
4fa33a1
Merge branch 'master' into Lift-Template-Literal-Restriction
Kingwl Aug 28, 2018
2b97fca
Merge branch 'master' into Lift-Template-Literal-Restriction
Kingwl Aug 29, 2018
78355db
accept baseline
Kingwl Aug 29, 2018
3da97e2
Merge branch 'master' into Lift-Template-Literal-Restriction
Kingwl Jan 19, 2019
dde0b37
fix merge break
Kingwl Jan 20, 2019
8bf6c64
Merge branch 'master' into Lift-Template-Literal-Restriction
Kingwl Apr 10, 2019
c4ccddf
fix merge break
Kingwl Apr 10, 2019
3e87998
inline rescan template head or no subsititution template
Kingwl Apr 10, 2019
826802f
update scan error
Kingwl Apr 10, 2019
7b67e5d
add comment and fix lint
Kingwl Apr 10, 2019
8671a24
refactor and fix lint
Kingwl Apr 12, 2019
6237adf
avoid blank
Kingwl Apr 12, 2019
12a1252
Merge branch 'master' of https://github.com/microsoft/TypeScript into…
Kingwl Aug 19, 2019
8b65fdc
fix merge conflict
Kingwl Aug 19, 2019
c4cb21d
Merge branch 'master' into Lift-Template-Literal-Restriction
Kingwl Aug 27, 2019
36c3bb3
fix again
Kingwl Aug 27, 2019
b7f5c77
fix again
Kingwl Aug 27, 2019
fd47863
Merge branch 'master' into Lift-Template-Literal-Restriction
Kingwl Jan 9, 2020
569b35e
use multiple target
Kingwl Jan 9, 2020
45406d4
Merge branch 'master' into Lift-Template-Literal-Restriction
sandersn Feb 5, 2020
f8b9bbb
fix space lint
sandersn Feb 5, 2020
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
fix incorrect return node if cannot transform
  • Loading branch information
Kingwl committed Jun 8, 2018
commit c2580ed14844e984ec3e4d19ba2f16cfeee02f3e
2 changes: 1 addition & 1 deletion src/compiler/transformers/taggedTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace ts {
const rawStrings: Expression[] = [];
const template = node.template;

if (level === ProcessLevel.LiftRestriction && !hasInvalidEscape(template)) return tag;
if (level === ProcessLevel.LiftRestriction && !hasInvalidEscape(template)) return node;

if (isNoSubstitutionTemplateLiteral(template)) {
cookedStrings.push(createTemplateCooked(template));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ function tag (str: any, ...args: any[]): string {
return str
}

const a = tag`123`
const b = tag`123 ${100}`
const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`;
const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`;
const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ function tag (str: any, ...args: any[]): string {
return str
}

const a = tag`123`
const b = tag`123 ${100}`
const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`;
const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`;
const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ function tag (str: any, ...args: any[]): string {
return str
}

const a = tag`123`
const b = tag`123 ${100}`
const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`;
const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`;
const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate
Expand Down