8000 Interop Gen: Support Literal Types in TS (i.e `null`, `true`, `false`) · Issue #384 · dart-lang/web · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Interop Gen: Support Literal Types in TS (i.e null, true, false) #384
Open
@nikeokoronkwo

Description

@nikeokoronkwo

This issue is to add support for generating Dart JS Interop Code for types that are a combination of literal types:

export const alwaysTrue: true;
export const alwaysFalse: false;
export const nullable: string | null;

export interface Literals {
  trueBoolean: true;
  stringOrfalseBoolean: string | false;
}

This would most likely mean matching with the literal if possible and using its base type (this means treating true and false as boolean if in a union, or if as a single type, maybe give the value as is without making an external call)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0