-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cli): add hygiene pass to transpile pipeline (#8586)
Co-authored-by: Bartek Iwańczuk <[email protected]>
- Loading branch information
1 parent
95ccc1a
commit 93d9f51
Showing
4 changed files
with
56 additions
and
0 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
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
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,42 @@ | ||
// deno-lint-ignore-file | ||
function A() { | ||
console.log("@A evaluated"); | ||
return function ( | ||
target: any, | ||
propertyKey: string, | ||
descriptor: PropertyDescriptor, | ||
) { | ||
console.log("@A called"); | ||
const fn = descriptor.value; | ||
descriptor.value = function () { | ||
console.log("fn() called from @A"); | ||
fn(); | ||
}; | ||
}; | ||
} | ||
|
||
function B() { | ||
console.log("@B evaluated"); | ||
return function ( | ||
target: any, | ||
propertyKey: string, | ||
descriptor: PropertyDescriptor, | ||
) { | ||
console.log("@B called"); | ||
const fn = descriptor.value; | ||
descriptor.value = function () { | ||
console.log("fn() called from @B"); | ||
fn(); | ||
}; | ||
}; | ||
} | ||
|
||
class C { | ||
@A() | ||
@B() | ||
static test() { | ||
console.log("C.test() called"); | ||
} | ||
} | ||
|
||
C.test(); |
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,7 @@ | ||
@A evaluated | ||
@B evaluated | ||
@B called | ||
@A called | ||
fn() called from @A | ||
fn() called from @B | ||
C.test() called |