Skip to content

Commit 815f0ad

Browse files
wip
1 parent c6c2cca commit 815f0ad

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

src/lib.rs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ impl TypeScriptPreProcessor {
129129
"jsx": true,
130130
"tsx": true,
131131
"decorators": true,
132+
"decoratorsBeforeExport": true,
132133
"dynamicImport": true,
133134
"preserveAllComments": false
134135
}},
@@ -291,7 +292,25 @@ pub mod tests {
291292
292293
export default DangerButton;
293294
"#,
294-
)
295+
),
296+
Script::new(
297+
"deco.ts",
298+
r#"
299+
300+
function profile(target) {
301+
const start = Date.now();
302+
const ret = target();
303+
const end = Date.now();
304+
console.log("%s took %sms", target.name, end - start);
305+
return ret;
306+
}
307+
308+
@profile
309+
export function doSomething() {
310+
console.log("hi");
311+
}
312+
"#,
313+
)
295314
];
296315

297316
for mut input in inputs {

0 commit comments

Comments
 (0)