dukat icon indicating copy to clipboard operation
dukat copied to clipboard

Missing simple object mapping from Typescript

Open lamba92 opened this issue 4 years ago • 2 comments

First of all nice job with 0.0.25! It actually works for Firebase (kind of)! I'd like to point out a little bug here:

declare namespace firebase.auth.ActionCodeInfo {
  type Operation = string;
  /**
   * An enumeration of the possible email action types.
   */
  var Operation: {
    /**
     * The email link sign-in action.
     */
    EMAIL_SIGNIN: Operation;
    /**
     * The password reset action.
     */
    PASSWORD_RESET: Operation;
    /**
     * The email revocation action.
     */
    RECOVER_EMAIL: Operation;
    /**
     * The email verification action.
     */
    VERIFY_EMAIL: Operation;
  };
}

The Operation variable does not get translated at all and is ignored probably because it is named as a type in the same file/object.

Also, may this be the correct translation?

@JsModule("firebase.auth.ActionCodeInfo")
@JsNonModule
external object Operation {
    val EMAIL_SIGNIN: Operation
    val PASSWORD_RESET: Operation
    val RECOVER_EMAIL: Operation
    val VERIFY_EMAIL: Operation
}

lamba92 avatar Jan 20 '20 00:01 lamba92

Thank you for this report. I'll take a look!

Schahen avatar Jan 20 '20 12:01 Schahen

😭 After few rebuilds the plugin deleted the externals and started erroring again 😭😭😭😭 Same error #197

Versions: (tried all combinations)

  • Kotlin: 1.3.61, 1.4.0-dev-1148
  • Gradle: 6.0.1, 6.1
  • Dukat: 0.0.24, 0.0.25

In the first try that worked I was using Kotlin 1.4.0-dev-1148, Gradle 6.1, Dukat 0.0.25 pikapika

EDIT: After launching for the nth time the jsGenerateExternals while tweaking Gradle and Kotlin versions, deleting build folders here and there, i managed to regenerate the bindings! Since this time I'm scared of loosing them i zipped them in the root of the repo 😆

lamba92 avatar Jan 20 '20 17:01 lamba92