Skip to content

Commit

Permalink
fix(types): handle multi-module definitions correctly (#22)
Browse files Browse the repository at this point in the history
* Fix typing.

* chore: remove manual copies

* chore: use postbuild script

Co-authored-by: Luke Edwards <luke.edwards05@gmail.com>
  • Loading branch information
tripodsgames and lukeed authored Aug 19, 2020
1 parent 43f298f commit 71f8415
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
16 changes: 1 addition & 15 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1 @@
declare module 'klona' {

This comment has been minimized.

Copy link
@tooss367

tooss367 Jan 7, 2021

index.d.ts

This comment has been minimized.

Copy link
@tooss367

tooss367 Jan 7, 2021

#22

tooss367-patch-1 @lukeed

export function klona<T>(input: T): T;
}

declare module 'klona/lite' {
export function klona<T>(input: T): T;
}

declare module 'klona/json' {
export function klona<T>(input: T): T;
}

declare module 'klona/full' {
export function klona<T>(input: T): T;
}
export function klona<T>(input: T): T;

This comment has been minimized.

Copy link
@tooss367

tooss367 Jan 7, 2021

tripodsgames:master

This comment has been minimized.

Copy link
@tooss367

tooss367 Jan 7, 2021

#22

This comment has been minimized.

Copy link
@tooss367
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"scripts": {
"build": "bundt",
"pretest": "npm run build",
"postbuild": "echo \"lite full json\" | xargs -n1 cp -v index.d.ts",

This comment has been minimized.

Copy link
@tooss367

tooss367 Jan 7, 2021

tooss367-patch-1

This comment has been minimized.

Copy link
@tooss367

tooss367 Jan 7, 2021

index.d.ts

This comment has been minimized.

Copy link
@tooss367

tooss367 Jan 7, 2021

to

  1. #22

oss367-patch-1

This comment has been minimized.

Copy link
@tooss367

tooss367 Jan 7, 2021

index.d.ts

This comment has been minimized.

Copy link
@tooss367

tooss367 Jan 7, 2021

package.json

"test": "uvu -r esm test -i suites"
},
"keywords": [
Expand Down

4 comments on commit 71f8415

@tooss367
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uiuxarghya:main

@tooss367
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tooss367
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tooss367-patch-1

@tooss367
Copy link

@tooss367 tooss367 commented on 71f8415 Jan 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tooss367-patch-1

71f8415

Please sign in to comment.