Skip to content

Commit

Permalink
Fix compatibility with TypeScript v5
Browse files Browse the repository at this point in the history
Now that TypeScript understands the `exports` field, we need to add types there too.

Also, the definition of a JSX element has changed slightly.
  • Loading branch information
swansontec committed Mar 28, 2024
1 parent 2d0de43 commit 8014a00
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

- fixed: Export the `EdgeObjectTemplate` type.
- fixed: TypeScript v5 compatibility.

## 2.4.0 (2024-03-25)

Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@
"exports": {
".": {
"import": "./lib/node/index.mjs",
"require": "./lib/node/index.js"
"require": "./lib/node/index.js",
"types": "./src/types/exports.ts"
},
"./package.json": "./package.json",
"./types": {
"import": "./types.mjs",
"require": "./types.js"
"require": "./types.js",
"types": "./src/types/types.ts"
}
},
"main": "./lib/node/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/types/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export interface EdgeFakeWorldProps extends CommonProps {
type ComponentType<Props> = (props: Props) => {
type: any
props: any
key: string | number | null
key: string | null
}

/**
Expand Down

0 comments on commit 8014a00

Please sign in to comment.