Hello there, Currently service.kt [Snippet 1] ```...
# javascript
a
Hello there, Currently service.kt [Snippet 1]
Copy code
@file:JsExports

external interface ServiceConfiguration {
  var appId: String
  var debug: Boolean?
}

fun service(config: ServiceConfiguration)
Yields the following typescript declaration (code out of this context is redacted): [Snippet 2]
Copy code
type Nullable<T> = T | undefined | null

export interface ServiceConfiguration {
  appId: string;
  debug: Nullable<boolean> // want this to be optionally provided
}

export function service(config: ServiceConfiguration);
After importing this bundled library in typescript, calling [Snippet 3]
Copy code
const service = service({ appId: "<app-id>" }) // troubles the ts compiler
The compiler expects both arguments like so [Snippet 4]
Copy code
const service1 = service({ appId: "<app-id>", debug: undefined }) // ts compiler is happy
const service2 = service({ appId: "<app-id>", debug: true }) // ts compiler still happy
Question is, how do I make the kotlin compiler to generate [Snippet 5]
Copy code
export interface ServiceConfiguration {
  appId: string;
  debug?: boolean // want this to be optionally provided
}
instead of the one being generated on [Snippet 2]. So that I may use it as written in [Snippet 3]?
Hello all, I created a ticket regarding optional properties for exported types here https://youtrack.jetbrains.com/issue/KT-48814. Please help me up vote this