

The Kotlin/JS IR compiler is capable of generating TypeScript definitions from your Kotlin code. We would appreciate your feedback on it in YouTrack. Opt-in is required (see the details below), and you should use it only for evaluation purposes. It may be dropped or changed at any time. The generation of TypeScript declaration files ( d.ts) is Experimental. Preview: generation of TypeScript declaration files (d.ts) To enable this mode, add the -Xerror-tolerance-policy= compiler option:Ĭ("-Xir-minimized-member-names=false") Regardless of what you write, the compiler will still try to generate a runnable executable.Īs an experimental feature, ignoring compilation errors requires an opt-in. The compiler will accept any code, even if it contains syntax errors. For example, assigning a number to a string variable (type mismatch). The compiler will accept code that is syntactically correct but doesn't make sense semantically. If you try to run the code that was broken during compilation, you'll get a runtime exception.Ĭhoose between two tolerance policies for ignoring compilation errors in your code: Thus, you can run the application and try its parts that don't use the broken code. With this new compiler mode, the compiler ignores all broken code. For example, when you're doing a complex refactoring or working on a part of the system that is completely unrelated to a compilation error in another part. In this mode, you can try out your application even while its code contains errors. Kotlin/JS IR compiler provides a new compilation mode unavailable in the default backend – ignoring compilation errors. Ignore compilation errors mode is Experimental. Kotlin.js.ir.anularity=whole-program // 'per-module' is the default
