Skip to content

Commit

Permalink
feat: add experimentalDecorators compiler option
Browse files Browse the repository at this point in the history
  • Loading branch information
eythaann committed Dec 17, 2024
1 parent 3cbe7da commit 00a1d33
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,14 @@ export interface BuildOptions {
* @default false
*/
emitDecoratorMetadata?: boolean;
/**
* Enable experimental support for legacy experimental decorators.
*
* See more: https://www.typescriptlang.org/tsconfig#experimentalDecorators
* @remarks This is true by default for backwards compatibility. To use the new decorators, set this to `false`.
* @default true
*/
experimentalDecorators?: boolean;
useUnknownInCatchVariables?: boolean;
};
/** Filter out diagnostics that you want to ignore during type checking and emitting.
Expand Down Expand Up @@ -280,7 +288,8 @@ export async function build(options: BuildOptions): Promise<void> {
esModuleInterop: false,
isolatedModules: true,
useDefineForClassFields: true,
experimentalDecorators: true,
experimentalDecorators: options.compilerOptions?.experimentalDecorators ??
true,
emitDecoratorMetadata: options.compilerOptions?.emitDecoratorMetadata ??
false,
jsx: ts.JsxEmit.React,
Expand Down

0 comments on commit 00a1d33

Please sign in to comment.