Explorar el Código

Bugfix: Type problems fixed.

lfabl hace 1 semana
padre
commit
7b60ce89d8
Se han modificado 2 ficheros con 9 adiciones y 3 borrados
  1. 2 1
      example/web/index.ts
  2. 7 2
      tsconfig.json

+ 2 - 1
example/web/index.ts

@@ -1,4 +1,5 @@
 import {
+    type RootTag,
     AppRegistry
 } from "react-native";
 import {
@@ -9,5 +10,5 @@ import App from "../src/index";
 AppRegistry.registerComponent(appName, () => App);
 AppRegistry.runApplication(appName, {
     initialProps: {},
-    rootTag: document.getElementById("app-root")
+    rootTag: document.getElementById("app-root") as unknown as RootTag
 });

+ 7 - 2
tsconfig.json

@@ -9,6 +9,8 @@
         "types": [
             "node"
         ],
+        "outDir": "lib",
+        "declarationDir": "lib/typescript",
         "allowUnreachableCode": false,
         "allowUnusedLabels": false,
         "composite": true,
@@ -20,7 +22,8 @@
         "forceConsistentCasingInFileNames": true,
         "jsx": "react-jsx",
         "lib": [
-            "ESNext"
+            "ESNext",
+            "dom"
         ],
         "module": "ESNext",
         "moduleResolution": "bundler",
@@ -39,6 +42,8 @@
         "verbatimModuleSyntax": true
     },
     "exclude": [
-        "version.mjs"
+        "version.mjs",
+        "lib",
+        "node_modules"
     ]
 }