Skip to content

Commit 34f60cd

Browse files
authored
Merge pull request #302 from algorandfoundation/fix/experimental_decorators
fix: override experimental decorators (#301)
2 parents fe954c9 + 1ecfa7c commit 34f60cd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/bin/tealscript.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ async function processFile(filename: string, parsed: any) {
3333
tsConfigFilePath,
3434
});
3535

36+
if (project.getCompilerOptions().experimentalDecorators !== true) {
37+
// eslint-disable-next-line no-console
38+
console.warn(
39+
`WARNING: 'experiementalDecorators' is not enabled in your tsconfig.json. TEALScript is manually overriding this option (in memory) for compilation. This will slightly increase the TEALSCript compile time. Please set 'experiementalDecorators' to 'true' in ${tsConfigFilePath}.`
40+
);
41+
project.compilerOptions.set({ experimentalDecorators: true });
42+
}
43+
3644
const compilers = Compiler.compileAll(content, project, options);
3745

3846
compilers.forEach(async (compilerPromise) => {

0 commit comments

Comments
 (0)