diff --git a/example/package.json b/example/package.json index 11b1132..50f597a 100644 --- a/example/package.json +++ b/example/package.json @@ -11,9 +11,9 @@ "dependencies": { "@stitches/react": "^1.2.8", "@u-wave/react-youtube": "file:..", - "@vitejs/plugin-react": "^3.0.0", - "react": "^18.0.0", - "react-dom": "^18.0.0", - "vite": "^4.0.1" + "@vitejs/plugin-react": "^4.0.0", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "vite": "^6.0.1" } } diff --git a/package.json b/package.json index 0650828..bf817a7 100644 --- a/package.json +++ b/package.json @@ -8,12 +8,13 @@ }, "dependencies": { "@types/prop-types": "^15.7.5", - "@types/react": "^17.0.0 || ^18.0.0", - "@types/youtube": "0.0.47", - "prop-types": "^15.7.2" + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "@types/youtube": "^0.1.0", + "prop-types": "^15.8.1" }, "devDependencies": { "@types/node": "^18.11.14", + "@types/react-dom": "^19.0.2", "@typescript-eslint/eslint-plugin": "^5.46.1", "@typescript-eslint/parser": "^5.46.1", "@u-wave/react-youtube-example": "file:example", diff --git a/src/loadSdk.ts b/src/loadSdk.ts index d0a9c2b..d16bfcb 100644 --- a/src/loadSdk.ts +++ b/src/loadSdk.ts @@ -1,4 +1,8 @@ -/// +declare global { + namespace YT { + function ready(callback: (value: typeof YT) => void): void; + } +} function loadSdk() { return new Promise((resolve, reject) => {