After releasing my first npm package, I realized that I needed to implement a declaration file ("*.d.ts") when integrating it into one of my projects. Despite multiple attempts, I have not been able to successfully integrate it and have spent days trying to resolve this issue. Any assistance would be greatly appreciated.
package.json
{
"main": "./dist/App",
"name": "react-native-range-slider-expo",
"description": "range slider",
"license": "MIT",
"homepage": "https://github.com/D10S60948/react-native-range-slider-expo#readme",
"version": "1.0.8",
"types": "./dist/App",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject",
"build": "tsc"
},
"dependencies": {
"expo": "~38.0.8",
"expo-status-bar": "^1.0.2",
"react": "~16.11.0",
"react-dom": "~16.11.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz",
"react-native-gesture-handler": "^1.6.1",
"react-native-svg": "^12.1.0",
"react-native-web": "~0.11.7"
},
"devDependencies": {
"@babel/core": "^7.8.6",
"@types/react": "~16.9.41",
"@types/react-native": "~0.62.13",
"typescript": "~3.9.5"
},
"keywords": [
"range",
"slider",
"expo"
]
}
tsconfig.json
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"jsx": "react-native",
"lib": ["dom", "esnext"],
"moduleResolution": "node",
"noEmit": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"strict": true,
"declaration": true,
"outDir": "./dist"
}
}