Skip to content

Commit 20df570

Browse files
author
Olavo Parno
committed
Enhance package configuration and type definitions
- Added a new script for type checking in `package.json`. - Updated the `appendTo` property type in `IScriptProps` to restrict it to 'head' or 'body' in `src/index.ts`.
1 parent 326581d commit 20df570

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"scripts": {
2929
"test": "CI=true react-scripts test --env=jsdom || true",
3030
"test:watch": "react-scripts test --env=jsdom",
31+
"typecheck": "tsc --noEmit",
3132
"prebuild": "rm -rf dist",
3233
"build": "rollup -c",
3334
"start": "rollup -c -w",
@@ -39,7 +40,7 @@
3940
"prepublishOnly": "npm run build"
4041
},
4142
"peerDependencies": {
42-
"react": "^17.0.2 || ^18"
43+
"react": "^17.0.2 || ^18 || ^19"
4344
},
4445
"devDependencies": {
4546
"@babel/core": "^7.17.4",

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface IScriptProps {
1515
otherProps?: THTMLScriptElementProps;
1616
startTrigger?: boolean;
1717
id?: string;
18-
appendTo?: string;
18+
appendTo?: 'head' | 'body';
1919
delay?: number;
2020
}
2121

0 commit comments

Comments
 (0)