static fields in JavaScript are now globally available since 2021 and since 2019 in Node.js V12.
The following F# code
type ClassWithExplicitStaticFields() =
static let mutable count = 42
static member Count = count
generates
export class ClassWithExplicitStaticFields {
constructor() {
}
}
(() => {
ClassWithExplicitStaticFields.count = 42;
})();
We could instead generate:
export class ClassWithExplicitStaticFields {
static count = 42;
constructor() {
}
}
staticfields in JavaScript are now globally available since 2021 and since 2019 in Node.js V12.The following F# code
generates
We could instead generate: