Platform-specific native binary for SWC TypeScript/JavaScript compiler on macOS ARM64 architecture
89
Build a CLI tool that transforms TypeScript files containing decorators from legacy syntax to modern syntax using a compiler tool.
Your tool should accept a TypeScript file path as input and output the transformed code. The tool must handle both class decorators and method decorators appropriately.
The input will be a TypeScript file containing classes with legacy decorators. For example:
function Logger(target: any) {
console.log('Class created:', target.name);
}
function Validate(target: any, propertyKey: string, descriptor: PropertyDescriptor) {
const original = descriptor.value;
descriptor.value = function(...args: any[]) {
console.log('Validating...');
return original.apply(this, args);
};
}
@Logger
class UserService {
@Validate
createUser(name: string) {
return { name };
}
}Your tool should be invoked as:
node transform.js <input-file-path>@generates
Provides high-performance TypeScript/JavaScript compilation and transformation capabilities.
Install with Tessl CLI
npx tessl i tessl/npm-swc--core-darwin-arm64docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10