Skip to content

Best Practies #23

Open
Open
@basarat

Description

@basarat

Another one

Prefer func() style function declarations on interfaces instead of func:Function as they allow overriding i.e. DO

interface Foo{
    take():number;
    take(num:number):void;
}

instead of

interface Foo {
    take: () => number;
    // No way to define this now, 
    take(num: number): void; // Error : duplicate identifier
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions