I’m trying to output a typescript definition file ...
# javascript
d
I’m trying to output a typescript definition file using MPP and the IR compiler, I have a simple data class in
commonMain
Copy code
@JsExport
data class Hello(val something: String)
and in my build.gradle.kts I have
Copy code
js(IR) {
        browser {
            binaries.executable()
        }
    }
when I try to do
gradle build
or I can see that something is compiled however there is no
build/js
directory and I have no idea where this has been created
d
Try running the
jsBrowserWebpack
task instead
h
executables don't produce a d.ts file, library does.
d
how do I configure it to produce a library
h
binaries.library()
d
what is the gradle task to run that?
just
gradle build
?
jsBrowserProductionLibraryDistribution
I guess
ah, it’s produced stuff in the global gradle build directory (i.e. in my home directory, not in the project directory). How can I get it to produce the files in the project output (or some custom output directory)?
Copy code
distribution {
                directory = File("$projectDir/output/")
            }