[webidl] JsName("null") companion for union types
Unrolling default params in case there's a probable overload ambiguity
Create target if needed for --descriptors
and --descriptors-jar
targets
Fix descriptors output in CLI
This is a release candidate with one known feature regression, "-p" key is not supported in CLI. We've received a lot of feedback on how this can be done better. We'll keep you posted.
- #248 Copying constructor to descendant class if former doesn't have it's own constructor
- #344 Optional method overloading without conflicting declarations
- #341 Support for optional lambdas in classes
- #379 No explicit import generated for types with the same name as stdlib types
- #296 ClassLike can not extend nested entity
- #307 dynamic TypeParam should be equivalent to generic param
- #367 Extract interfaces from files annotates with JsModule and/or JsQualifie
- #368 TypeAliases moved outside of external declarations files are lost
- #372 Illegal dynamic TypeAlias occurs under specific circumstances
- #272 Unalias members in union types
- #275 Redundant overloads are causing compilation issue
- #349 Type parameters are not substituted or generated in particular cases
- #314 Lambdas are not overriding similar methods in Kotlin, they do in Typescript #314
- #343 Recursive typealias's generated with Dukat 0.5.7
- #350 Merge multiple lambda properties with same name and type, but different metadata
- #358 - Unaliased type parameters are not processed incorrectly
- Fix some issues with inheriting from UInt8Array
- #331 - Rename type alias if there's a name clash
- #330 - Leave fqName if short import is problematic
Minor release dedicated to build and performance improvements
- #329 Add Suppress(EXTERNAL_DELEGATION) only where we actually need it
In this release we switched typescript compiler API to 3.9.5 and if you won't notices it's actually a good sign.
- #320 Test server should reject file paths from outside the repository
- #323 Omit Object inheritance clause
- #318 Switch to typescript 3.9.5
- #266 Resolve star exports
- #316 Vararg param is mistakenly resolved as overriding
- #315 Imported entities name clash lead to override errors
- #269 Child interface should redeclare ambiguous parent member
- #309 Unresolved property expressions in constructor params
- #313 Set primary constructor only when there's a single constructor
- #310 Regenerated setter causes invalid override
- #311 Narrow types in setter whenever it makes sense
Minor release dedicated to reducing the number of conflicting overloads.
- #301 Rudiment type params lead to conflicting overloads
- #306 Conflicting overload on unrolling union type containing both string literal and string
- #305 Translation failure when trying to nullify intersection type
- #174 Function overloaded with different string literals causes duplicate function
- #270 Imported string unions are set to Any
- #273 Number literal unions are resolved as String
- #279 Declarations clash after removing string literals in params and type params
- #299 Exported type aliases are missing
This release changes behaviour in some common scenarios so we've decided to update version to 0.5.0.
Say, we have declarationA.d.ts
and declarationB.d.ts
. Say, also, declarationA
depends on ClassA
from libC
,
while declarationB
is importing InterfaceB
from libC
.
Before this release running both dukat declarationA.d.ts
and dukat declarationB.d.ts
would have generate all definitions for libC
, which can be pretty big and contain hundreds of declarations
which dukat user actually had no intentions to use. Users actually asked us a lot to translate only those
of declarations that are actually needed. We've implemented this but everything comes with a price.
So, as of know calling dukat declarationA.d.ts
will translate only ClassA and its dependencies from libC.
The same will do the dukat declarationB.d.ts
. It's very important to understand that this can lead for the loss
of declarations that declarationA depends on. To avoid this just call dukat passing both declarationA.d.ts and declarationB.d.ts.
In other words, translate all declarations you need in a single pass, this is the main scenario.
- #283 Add possibility to pass tsconfig.json
- #245 Merge interfaces and classes
- #281 Override is not resolved correctly for classes with generic parents that are narrowed down
- #280 Method copied to interface implementation preserving type params
- #268 Conflicting overloads are not resolved for functions
- #265 Default export is not propagated to the overloaded implementations
- #252 Dynamic type aliases are impossible
- [descriptors] support for
inline
andcrosslinine
modifiers in descriptors - [typescript] Inlined invoke extension function can have return type
- [typescript] Merge vars and interfaces even if they are in different files (but in the same package)
- [typescript] Merge classlikes correctly (under some conditions they were copied after merge)
- [typescript] Preserve type params while resolving this return type in extension functions
- [build] make it possible to build with arbitrary version of kotlin compiler
- [build] typescript compiler version updated to 3.5.3
- [descriptors] support for compiling with 1.3.70-eap-42
- [typescript] Move top level declarations into a separate file whenever it's invalid to keep them with the rest of declarations (that is, when there's file-level JsQualifier or JsModule annotations)
- [idl] Don't add import for the same package this file belongs to
- In some cases something that is a valid override in typescript is not an override in kotlin, we have to copy overriden method to the descendant class.
- Rename class if it's name clashes with the named import
- Types from optional params are not forcibly converted to nullables Inline extension functions generated from interfaces are unrolled if there're optional params.
- Minimal CLI support for compiling binary descriptors (this one so far is for dev purposed)
- Some overrides in Typescript are not treated as such in Kotlin, so we have to add reintroduce them to the descendant classes
- Filter out all class parents except the very first one for classes
- In some cases @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") was missing.
- Mutliple escaping issues fixes.
- Rename params instead of escaping them (for instance,
object
renamed to justobj
). - Convert UnionType to string whenever it's possible.
- Resolve "import as" clauses and introduce imports accordingly.
- Resolve overrides for nested classes and interfaces.
- Remove conflicting overloads.
- Treat names starting with dot as non-supportable. Unforunately, we need to introduce some changes in Kotlin/JS compiler itself for supporting property names not accessible via dot.
- Always add JsNonModule alongside with JsModule.
- Convert boolean literals to Boolean while converting types.
- Copy methods generated from unrolled union types to ancestor classes.
- equals should have "override" modifier only when param is Any?
- Resolve file names from namespaced nodejs packages.
- Correct override resolving for methods with return type.
- Resolve overrides when return type is generic.
- Replace ReadonlyArray from ts stdlib with just Array.
- Preserve TypeParams in unaliased entities in cases when they were lost.
- Replace entity inherited from a final class (in a Kotlin stdlib sense with alias.
- Better support for Partial. Whenever this class is defined in this particular declaration source set, new class is generated which mimicks Partial behaviour.
- Resolving relative module names (see #110 - Inconsistent naming while translating @types/lodash)
- Support type references in typescript declarations.
- #133 Lack of type params in generated interfaces
- #136 Convert nested nullable unions correctly
- #141 ThisTypeDeclaration leak in inline functions generated from merged interfaces
- Default ts library is switched to lib.es6.d.ts.
With this release idl target is no longer experimental. It's main focus remains the same, however: to generate stdlib for following releases of Kotlin/JS.
- [idl] support for record types, partial namespaces
- [idl] minor improvements for mixins and enums
- [idl] (#124) always show public visibility modifier in accordance with KEEP-45
- Translate Pick<T, K> to Any (in case T is actually a type param)
- #129 - Failing to translate generic params with default values when such values are not type params
- Namespaced aliases lost in translation
- Correct escaping for entities in heritage clauses, constraint params
- Any toString method with no parameters is override
- Generic params information is lost for lambdas in types Support for generic params with default values pointing to some other generic params
Starting from this release generated files names will match following pattern:
[file_name].[packageName]?.[module_name]?.[additional_postfix]
For instance, let's say we have file foo.d.ts
in fooController
package,
and following file is generated: foo.helpers.module_fooController.kt
.
Then we know that the original file was called foo.d.ts, the file itself
belongs to the package "helpers" and npm module is fooController.
- Module name resolving is based only on existence of package.json and its content (DUKAT-1 and DUKAT-4)
- Losing part of generated files because of the name clash
- Generated entities name clash, case-sensitivity related
- [regression] -r (build report) command-line flag behaviour fixed
- Batch mode removed completely - it was used for dev purposes only and in it's current form proved to be quite inefficient
- This release contains mainly idl-related changes. The idl target is considered production-ready, however its support is still experimental.
- Compiling protobuf-generated java code to 1.6 (which is currently the target version for dukat)
- The only change is speed, however, this change is big. Since this release ts is parsed on nodejs side and passed in a binary form to the JVM side.
- Add global module annotation in case we have default export but don't have module annotation so far
- [idl] Allow translation of several files (dependent on each other)
- [idl] Introduce getters/setters and enums
- [idl] Support for union types and function (callback) types
- [idl] support for translating dictionaries, nullable types, array types and parameter types
- [idl] support "implements" statement
- redundant Unit return type in not printed anymore
- package name (if found) is added as a prefix to the name of the translated entity
- #73 - Union type unrolling is broken when it's aliased in a referenced file
- [idl] Support typedefs in inheritance declarations
- Experimental (and definitely incomplete) support for idl conversion
- Add NESTED_CLASS_IN_EXTERNAL_INTERFACE only when it's needed
- Merge modules into top level declarations with the same name whenever it's possible
<ROOT>
prefix should not end up in heritage clauses (#56)- Type aliases are moved out from files with file-level
JsQualifier
andJsModule
annotations (#41) - Only files with
*.d.ts
extension are processed - TypeScript dependency updated to 3.5.2
- Graal-SDK updated to 19.0.0
- #55 - Don't rename exported variables in external modules
- #31 - Remove redundant "definedExternally"
- Fixing behaviour for resolving JsModules and JsQualifier (see #45 - Export with assignment should produce JSModule annotation)
- [cli] -m option added so one can resolve JsModule names manually for files that are not in node_modules
- [dev] Make it possible to save optionally minimal report on dukat run (#35 - Generate JSON report based on run results)
- Resolving overrides parent entity is defined in stdlib (#33 - Overrides not resolved for entities extending external objects)
- Fix for #9 ("Overrides are not resolved for parent entities defined in different files")
- Allow custom qualified package name set from CLI (#30 - Custom qualified package name will lead to a failure)
- Respect covariance in return types while resolving overrides
- #34 - Processing lib references (like
/// <reference lib="es5" />
) - support for this is experimental and was introduced mainly for debugging purposes
- All files by default are translated into the root package (so, no package declaration at all) - #28
- Translate file and all files referenced in it single run (#22)
- Omit computed property names - this is the best we can do right now
- command line - In some cases files were not processed correctly from command line (#26 and [#])
- J2V8 js-backend removed
- precise meta information for string literals
- collapse unrolled callable entities if they differ only by metainformation
- support ObjectTypeDeclaration as a return type in FunctionTypeDeclaration (unable to process ParameterValueDeclaration ObjectLiteralDeclaration)
- recursive processing for polymorphic this (Unable to process ParameterValueDeclaration ThisTypeDeclaration)
- process correctly UnionTypeDeclaration (#17), IndexSignatureDeclaration (#16), ConstructorDeclaration (#15), IntersectionDeclaration (#14) and FunctionTypeDeclaration (#19)
- Fix for override resolution in properties (#5 -'property' overrides nothing)
- Support for Object Literals in generic constraints (#4 - Dynamic type can not be used as an upper bound)
- #8 - CLI Option -b some_pacakge_name gave no effect
- JVM target downgraded down to 1.6 (Can't run on JRE 1.8)
- CLI works properly in windows
- multiple fixes for declartions in heritage classes
- resolve to "any" in case we've encountered unknown kind of declaration
- nashorn js backend removed completely
- support for string-literals in property names
- support type aliasing for basic types
- support for Partial wrapping object literal
- dukat npm package introduced