mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
Add type for react-native-version-number module (#24789)
This commit is contained in:
parent
65f148de7d
commit
d4cb87d64d
14
types/react-native-version-number/index.d.ts
vendored
Normal file
14
types/react-native-version-number/index.d.ts
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
// Type definitions for react-native-version-number 0.3
|
||||
// Project: https://github.com/APSL/react-native-version-number
|
||||
// Definitions by: Vincent Langlet <https://github.com/VincentLanglet>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
interface VersionNumber {
|
||||
appVersion?: string;
|
||||
buildVersion?: string;
|
||||
bundleIdentifier?: string;
|
||||
}
|
||||
|
||||
declare const VersionNumber: VersionNumber;
|
||||
|
||||
export default VersionNumber;
|
||||
@ -0,0 +1,22 @@
|
||||
import VersionNumber from 'react-native-version-number';
|
||||
|
||||
const FullVersionNumber: VersionNumber = {
|
||||
appVersion: '1.0',
|
||||
buildVersion: '42',
|
||||
bundleIdentifier: 'com.foo.bar.MyApp',
|
||||
};
|
||||
|
||||
const MissingAppVersionNumber: VersionNumber = {
|
||||
buildVersion: '42',
|
||||
bundleIdentifier: 'com.foo.bar.MyApp',
|
||||
};
|
||||
|
||||
const MissingBuildVersionNumber: VersionNumber = {
|
||||
appVersion: '1.0',
|
||||
bundleIdentifier: 'com.foo.bar.MyApp',
|
||||
};
|
||||
|
||||
const MissingBundleVersionNumber: VersionNumber = {
|
||||
appVersion: '1.0',
|
||||
buildVersion: '42',
|
||||
};
|
||||
23
types/react-native-version-number/tsconfig.json
Normal file
23
types/react-native-version-number/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"react-native-version-number-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/react-native-version-number/tslint.json
Normal file
1
types/react-native-version-number/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user