Closed
Description
Example: Option.d.ts
export declare class None<A> implements FantasyMonad<URI, A>, FantasyFoldable<A>, FantasyTraversable<URI, A>, FantasyAlternative<URI, A>, FantasyExtend<URI, A> {
static of: typeof of;
static empty: typeof empty;
static zero: typeof zero;
static value: Option<any>;
readonly _tag: string; // this should be 'None', not `string`
readonly _A: A;
readonly _URI: URI;
private constructor();
...
}
Can be fixed by adding an explicit type annotation in the source
readonly _tag: 'None' = 'None'
Relevant microsoft/TypeScript#15881