Type 'PasswordStrengthCode' not working
Opened this issue · 2 comments
seopei commented
The PasswordStrengthCode
is defined as enum in your .d.ts file. At runtime this type will not exist, because normally an enum will be compiled into an object and on a .d.ts no compilation takes place. See https://www.typescriptlang.org/play#example/enums
I think you have to declare PasswordStrengthCode
in your .js file like this as well:
var PasswordStrengthCode = {
WEAK: "WEAK",
...
}
fidian commented
What error are you getting?
I've done similar things at work and they compile and work just fine, so I would like to verify the problem before exporting strings. Maybe a playground link to the problem?
seopei commented
PasswordStrengthCode
is undefined. Here a stackblitz example: https://stackblitz.com/edit/typescript-rhyevf?file=index.ts