React Native Typescript types with an extra added type: className
property.
These types should be used together with React Native CSS modules.
The package.json
alias feature used here is only supported by Yarn. The feature is not supported by npm.
Replace normal @types/react-native
installation...
"@types/react-native": "^0.57.55",
...with this (versions >=0.52.4
are supported):
"@types/react-native": "kristerkari/react-native-types-for-css-modules#v0.57.55",
...and run yarn install
.
You can also omit the version tag (not recommended):
"@types/react-native": "kristerkari/react-native-types-for-css-modules",
@types/react-native
versionsNew @types/react-native
versions are being regularly published from the DefinitelyTyped repository.
It would be too difficult and time consuming to manually update the className
type to each new version of @types/react-native
. That's why there is a Ruby script that looks for new @types/react-native
versions from npm
and creates a new version to this repository.
Use ruby update_versions.rb
to update className
type to newer @types/react-native
version(s).