Trails Packages
    Preparing search index...

    Interface DeclaredService<InterfaceName>

    Base interface for services that are associated with a well known interface name.

    By using this base interface, you can ensure that users of your interface use the correct interface name.

    Note that this interface is a type level marker only. It has no real associated methods or properties and it is not necessary to implement anything to use this interface in a class.

    // MyLogger should be referenced via "my-package.Logger"
    export interface MyLogger extends DeclaredService<"my-package.Logger"> {
    log(message: string): void;
    }

    Note: TypeScript may list the INTERNAL_ASSOCIATED_SERVICE_METADATA property when generating the implementation for an interface extending this type. You can simply remove the offending line; it is not required (and not possible) to implement that attribute - it only exists for the compiler.

    Type Parameters

    • InterfaceName extends string

    Hierarchy (View Summary)