@duckduckgo/content-scope-scripts
    Preparing search index...

    Function createTypedMessages

    • This utility can be used to convert an instance of the Messaging interface into a strongly typed one.

      The first input is any class where you've added your typed messages, and then the second input is any instance of Messaging, which gets converted into only calls supported by your schema

      Type Parameters

      • BaseClass extends Partial<MessagingBase<MessageTypes>>

      Parameters

      • _base: BaseClass

        the class onto which you've added the properties from MessagingBase

      • _messaging: Messaging

      Returns BaseClass