Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: module-import-declaration #67

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"lint": "eslint .",
"build": "babel src/ --out-dir build --ignore '**/*.test.js'",
"build": "babel src/ --out-dir build --ignore '**/*.test.js' && tsc",
"test": "jest"
},
"peerDependencies": {
Expand All @@ -50,7 +50,8 @@
"react": "^16.9.0",
"react-dom": "^16.12.0",
"react-native": "^0.64.1",
"react-test-renderer": "16.9.0"
"react-test-renderer": "16.9.0",
"typescript": "^4.4.4"
},
"jest": {
"preset": "react-native"
Expand Down
18 changes: 18 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
// Change this to match your project
"include": ["src/**/*"],
"compilerOptions": {
// Tells TypeScript to read JS files, as
// normally they are ignored as source files
"allowJs": true,
// Generate d.ts files
"declaration": true,
// This compiler run should
// only output d.ts files
"emitDeclarationOnly": true,
// Types should go into this directory.
// Removing this would place the .d.ts files
// next to the .js files
"outDir": "build"
}
}