(But omit the ARTStatic type because the documentation for @types/react-native-community/art doesn't mention a default export anywhere, and change the name 'ARTText' to just 'Text' to match the exports.)
Fix issue #12
Test Plan
Clone and run a test project which uses TypeScript and ART:
Summary
@types/react-native-community/art
doesn't mention a default export anywhere, and change the name 'ARTText' to just 'Text' to match the exports.)Test Plan
Clone and run a test project which uses TypeScript and ART:
git clone https://github.com/richardbarrell-calvium/ReactNativeArtTypescriptTest.git
cd ReactNativeArtTypescriptTest
yarn
(cd ios; pod install)
react-native run-ios
react-native run-android
Verify that tsc passes:
yarn tsc
Introduce a type error and verify that tsc no longer passes:
App.tsx
, replacestrokeWidth={2}
withstrokeWidth="2"
yarn tsc
What's required for testing (prerequisites)?
node
yarn
What are the steps to reproduce (after prerequisites)?
yarn add @react-native-community/art
import {Surface} from '@react-native-community/art'
to a typescript source fileyarn tsc
Compatibility
Checklist
README.md
- skipped because taking advantage of the TS types is transparentexample/App.js
) - skipped because the example project does not use TypeScript