Skip to content

Commit c7e1c21

Browse files
committed
type updates and npm publish fix
1 parent 18ba43f commit c7e1c21

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

.npmignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
!dist
2+
example/
3+
coverage/
4+
docs/
5+
jest.config.js
6+
tsconfig.json
7+
config/
8+
.editorconfig
9+
.prettierrc

example/src/pokemon.global.island.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ injectCSS(style)
77

88
const island = createIsland(Pokemon)
99

10-
// @ts-ignore
10+
// @ts-expect-error - We're mutating the window to add this
1111
window._pokemon = island

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "preact-island",
3-
"version": "1.0.0",
3+
"version": "1.0.3",
44
"type": "module",
55
"description": "🏝 Create your own slice of paradise on any website.",
66
"source": "src/index.ts",

src/island.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export type Island<P extends InitialProps> = {
104104
/**
105105
* Initial props to pass to the component. These props do not cause updates to the island if changed. Use `createIsland().rerender` instead.
106106
*/
107-
initialProps?: P
107+
initialProps?: Partial<P>
108108
/**
109109
* A valid selector to a script tag located in the HTML document with a type of either `text/props` or `application/json`
110110
* containing props to pass into the component. If there are multiple scripts found with the selector, all props are merged with

src/lib.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export function createRootFragment(
145145
parent.insertBefore(c, r || s)
146146
}
147147
// Mutating the parent to add a preact property
148-
// @ts-ignore
148+
// @ts-expect-error We're mutating the parent to add these properties for Preact
149149
return (parent.__k = {
150150
nodeType: 1,
151151
parentNode: parent,

0 commit comments

Comments
 (0)