Joffrey
06/03/2019, 9:01 PMexport interface Headers {
'content-length'?: string;
}
Dukat generates the following, which is valid Kotlin in general:
external interface Headers {
var `content-length`: String?
get() = definedExternally
set(value) = definedExternally
}
But now the compiler complains:
Name contains illegal chars that can't appear in JavaScript identifier
Does this mean that the kotlin compiler doesn't support outputting JS with string properties?
I tried with @JsName
, but it doesn't accept the dash either. Is there a way to work around this?
EDIT: question posted on StackOverflow
https://stackoverflow.com/questions/56434633/external-declaration-gives-name-contains-illegal-chars-that-cant-appear-in-javU75957
06/04/2019, 5:54 AMdukat
github https://github.com/Kotlin/dukat/issues
And I join the question. Why illegal chars can't appear in JavaScript property identifier?Joffrey
06/04/2019, 6:35 AM