Skip to content

TypeScript 1.5 - Metadata Annotations / Interfaces #2305

Closed
@giancarloa

Description

@giancarloa

Hi there... I am struggling trying to find documentation on the TypeScript metadata annotation features that are apparently coming in 1.5... my question is how will interfaces work with metadata annotations knowing that TS interfaces have no runtime form???? take the following TS code:

class Server{
}

class Client{
constructor(svr: Server){
}
}

I have not been able to find much detail on how TS will handle this, but based on the old AtScript documentation, I believe the transpiled JS code will look something like this:

function Server(){
}

function Client(svr){
}

Client.parameters = [{is: Server}];

That's all fine and good but what will the JS look like if the TS is like that below whereby we introduce an interface??????

class IServer{
}

class Server implements IServer{
}

class Client{
constructor(svr: IServer){
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions