Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Typescript Definitions #14

Open
yatki opened this issue Feb 2, 2021 · 2 comments
Open

Typescript Definitions #14

yatki opened this issue Feb 2, 2021 · 2 comments

Comments

@yatki
Copy link

yatki commented Feb 2, 2021

Hello,

Thank you very much for the library. It's great.

Would it be possible for you to add typescript definitions for the library?

Have a great week.

@robertjcolley
Copy link

#12 I don't think the maintainers are active in this project anymore :(

@estanglerbm
Copy link

If you don't want to use the type defs from #12, then here's just the quick workaround suggested by ng serve output in Angular.

For ES2015 Angular 15, after npm install page-lifecycle, added file src/lifecycle.mjs.d.ts or node_modules/page-lifecycle/dist/lifecycle.mjs.d.ts:

declare module 'node_modules/page-lifecycle/dist/lifecycle.mjs';

Then imported like this:

import lifecycle from 'node_modules/page-lifecycle/dist/lifecycle.mjs';

No frills, though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants