Skip to content

Generate Ext.create() with dynamicly returned type. #10

@tomFlidr

Description

@tomFlidr

// ambient context:
declare interface ExtGlobalTypes {
"Ext.dom.Element": Ext.dom.Element;
"Ext.data.Store": Ext.data.Store;
...
}
declare class Ext {
public static create (className: K, ...args: object[]) => ExtGlobalTypes[K];
}

// standard context:
var store = Ext.create("Ext.data.Store", {});
// ... store is now Ext.data.Store type:-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions