Skip to content

Conversation

@zhengbli
Copy link
Contributor

Help with #66

Now one can add a base interface to an interface as follows:

    {
        "kind": "extends",
        "baseInterface": "ParentNode",
        "interface": "Document"
    }

yield {Type = p.Type; Name = p.Name; Optional = p.Optional.IsSome; Variadic = p.Variadic.IsSome}]
Pt.printl "declare var %s: {new(%s): %s; };" nc.Name (ParamsToString ncParams) i.Name)

let EmitInterfaceDeclaration (i:Browser.Interface) =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this only works with interfaces. Is there a need for classes too? (I'm not familiar with lib.d.ts so could be there's not.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no classes in dom.generated.d.ts, all types in the spec translate to an interface (instance side) and a declared var constructor function (static side).

@sandersn
Copy link
Member

👍

zhengbli added a commit that referenced this pull request Mar 21, 2016
@zhengbli zhengbli merged commit 04bb287 into master Mar 21, 2016
@zhengbli zhengbli deleted the AddExtends branch March 21, 2016 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants