Skip to content

Add TypeScript support for "Import post-me as a script" #62

@ChrisTorng

Description

@ChrisTorng

Is your feature request related to a problem? Please describe.
I'm using "Import post-me as a script" way, on TypeScript. But can't find a built in way to code strong type in TypeScript.

Describe the solution you'd like
I add a new export_post-me.d.ts as:

export * from '../lib/post-me/dist/index';
export as namespace PostMe;

Then I can new PostMe.WindowMessenger() object, or get PostMe.RemoteHandle type.
I suggest post-me to include export as namespace PostMe, and add description in README.md. Let new comer like me spent less time try to find the right way.

Describe alternatives you've considered
I have no other way to make post-me strong type, except any. If you have a better way to make TypeScript happy, I'm glad to know. And still hope to add description in README.md too.

Additional context
No.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions