View Code? Open in Web Editor
NEW
A TypeScript transformer that makes stubbing work when targeting CommonJS
License: MIT License
TypeScript 84.19%
JavaScript 15.81%
ts-use-exports's Introduction
Hi there ๐, I am Thomas
- Iโm interested in compilers, algorithmic trading and AGI
- How to reach me: email me at [email protected]
ts-use-exports's People
Contributors
Stargazers
Watchers
ts-use-exports's Issues
function foo() {
return "actually baz";
}
export function bar() {
return foo() + "bar";
}
export { foo as baz };
transpile to
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function foo() {
return "actually baz";
}
exports.baz = foo;
function bar() {
return exports.foo() + "bar";
}
exports.bar = bar;
In other words, properly detect whether a function is exported instead of doing it syntactically.