Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
@expo/config-types
Advanced tools
The @expo/config-types package provides TypeScript definitions for Expo config (`app.json` / `app.config.js`). It allows developers to have type checking and auto-completion when working with Expo configuration files, ensuring that the configuration adheres to the expected structure and types defined by Expo.
Type checking for app.json
This code sample demonstrates how to define an Expo app configuration with type checking. It ensures that the configuration object adheres to the structure and types expected by Expo, providing auto-completion and preventing common mistakes.
import { ExpoConfig } from '@expo/config-types';
const config: ExpoConfig = {
name: 'My Expo App',
slug: 'my-expo-app',
version: '1.0.0',
orientation: 'portrait',
icon: './path/to/icon.png',
splash: {
image: './path/to/splash.png',
resizeMode: 'contain',
backgroundColor: '#ffffff'
},
updates: {
fallbackToCacheTimeout: 0
},
assetBundlePatterns: ['**/*'],
ios: {
supportsTablet: true
},
android: {
adaptiveIcon: {
foregroundImage: './path/to/foreground.png',
backgroundColor: '#FFFFFF'
}
}
};
While not directly related to Expo configuration, @types/react-native provides TypeScript definitions for React Native components and APIs. It serves a similar purpose in the context of React Native development by offering type checking and auto-completion, enhancing developer experience and code reliability.
typescript-json-schema is a tool that generates JSON schemas from TypeScript types. It can be used to validate JSON data structures against TypeScript interfaces. In comparison, @expo/config-types specifically provides TypeScript definitions for Expo configuration, whereas typescript-json-schema is a more general tool for generating JSON schemas from any TypeScript types.
@expo/config-types
Types for the Expo config object app.config.ts
.
import { ExpoConfig } from '@expo/config-types';
export default (): ExpoConfig => {
return {
name: 'My App',
slug: 'my-app',
};
};
This package is 100% generated using the versioned JSON schemas from the Expo server.
yarn generate
- uses the major version from the package.json
.yarn generate --path ../../../universe/server/www/xdl-schemas/UNVERSIONED-schema.json
- uses the latest version from your local directory.yarn generate 39
- uses the given version.yarn generate unversioned
- uses the latest version.49.0.0 — 2023-06-27
@react-native-community/datetimepicker
from 6.7.3
to 7.2.0
. (#23034 by @gabrieldonadel)@react-native-community/netinfo
from 9.3.7
to 9.3.10
. (#22892 by @douglowder)@react-native-masked-view/masked-view
from 0.2.8
to 0.2.9
. (#22875 by @gabrieldonadel)@react-native-picker/picker
from 2.4.8
to 2.4.10
. (#22919 by @keith-kurak)@react-native-segmented-control/segmented-control
from 2.4.0
to 2.4.1
. (#22911 by @keith-kurak)@shopify/flash-list
from 1.4.0
to 1.4.3
. (#22893 by @gabrieldonadel)@shopify/react-native-skia
from 0.1.172
to 0.1.196
. (#22900, #23036, #23157 by @kudo)lottie-react-native
from 5.1.4
to 5.1.6
. (#22868 by @alanjhughes)react-native-gesture-handler
from 2.10.1
to 2.12.0
. (#22621 by @aleqsio)react-native-maps
from 1.3.2
to 1.7.1
. (#22908 by @aleqsio)react-native-pager-view
from 6.1.2
to 6.2.0
. (#22892 by @douglowder)react-native-reanimated
from 2.14.4
to 3.3.0
. (#22907 by @kudo)react-native-safe-area-context
from 4.5.0
to 4.6.3
. (#23026 by @tsapeta)react-native-screens
from 3.20.0
to 3.22.0
. (#23022 by @tsapeta)react-native-svg
from 13.4.0
to 13.9.0
. (#22934 by @alanjhughes)react-native-view-shot
from 3.5.0
to 3.7.0
. (#23024 by @tsapeta))react-native-webview
from 11.26.0
to 13.2.2
. (#22913 by @aleqsio)expo-application
robolectric
to 4.10
and junit
to 4.13.2
. (#22395 by @josephyanks)expo-battery
robolectric
to 4.10
and junit
to 4.13.2
. (#22395 by @josephyanks)expo-clipboard
robolectric
to 4.10
. (#22395 by @josephyanks)expo-crypto
robolectric
to 4.10
and junit
to 4.13.2
. (#22395 by @josephyanks)expo-location
com.google.android.gms:play-services-location
to 21.0.1
and io.nlopez.smartlocation:library
to 3.3.3
(#22468 by @josephyanks)expo-media-library
robolectric
to 4.10
. (#22395 by @josephyanks)expo-modules-core
robolectric
to 4.10
and junit
to 4.13.2
. (#22395 by @josephyanks)expo-sms
robolectric
to 4.10
and junit
to 4.13.2
. (#22395 by @josephyanks)expo-web-browser
robolectric
to 4.10
. (#22395 by @josephyanks)expo-blur
expo-face-detector
expo-gl
enableExperimentalWorkletSupport
to use GLView from Reanimated worklet. (#22613 by @wkozyra95)expo-file-system
UploadProgressData.totalByteSent
field. (#22277 by @gabrieldonadel)expo-linking
detach.scheme
schemes (ExpoKit). (#22848 by @EvanBacon)expo-notifications
ExpoPushTokenOptions.experienceId
field. (#22303 by @gabrieldonadel)expo-battery
useBatteryLevel
, useBatteryState
, useLowPowerMode
, and usePowerState
. (#22646 by @Adam-Schlichtmann)expo-blur
expo-brightness
expo-clipboard
ClipboardPasteButton
view that uses UIPasteControl
. (#22823 by @alanjhughes)expo-device
deviceType
constant. (#21633 by @robertherber)expo-document-picker
expo-gl
expo-file-system
expo-image-picker
expo-localization
expo-media-library
expo-screen-capture
expo-sharing
UIDocumentInteractionController
to UIActivityViewController
which provides more features. (#22012 by @alanjhughes)expo-modules-core
ReactActivityHandler.getDelayLoadAppHandler
interface on Android. (#20273 by @kudo)Image
and Media
rather than Fetch
. (#23058 by @kudo)expo-speech
expo-print
expo-screen-orientation
expo-secure-store
expo-sqlite
Promise
based execAsync
and transactionAsync
functions. (#23109 by @kudo)expo-application
expo-asset
@react-native/assets-registry
module not found issue on Web. (#21469 by @kudo)expo-background-fetch
expo-barcode-scanner
expo-av
expo-battery
expo-blur
expo-brightness
expo-branch
expo-calendar
expo-cellular
expo-clipboard
expo-device
expo-document-picker
Record
on Android. (#21588 by @alanjhughes)copyToCacheDirectory
on iOS. (#23102 by @aleqsio)expo-camera
expo-contacts
expo-face-detector
expo-gl
expo-file-system
expo-haptics
expo-image-loader
expo-crypto
expo-intent-launcher
expo-image-picker
.png
when opening .bmp
files and selecting any quality in ImagePickerOptions
. (#21361 by @behenate)MediaTypeOptions.All
(#22606 by @fobos531)expo-constants
expo-keep-awake
expo-font
expo-mail-composer
expo-location
expo-local-authentication
NSFaceIDUsageDescription
in the Info.plist. (#21500 by @alanjhughes)expo-localization
getCalendars
on Web. (#22003 by @aleqsio)expo-linear-gradient
expo-media-library
expo-random
expo-notifications
expo-screen-capture
expo-sharing
expo-modules-core
URL
type to support unencoded UTF8 urls and file paths. (#21139 by @tsapeta)#
getting cut off. (#21326 by @lukmccall)URL
object. (#21569 by @tsapeta)ReadableNativeMap
cannot be cast to the Record
. (#21773 by @lukmccall)JavaScriptObject
argument and view props. (#22427 by @lukmccall)Color
converter doesn't work on devices with SDK version below 26. (#22191 by @lukmccall)View cannot be cast to ViewGroup
exception on Android. (#23264 by @lukmccall)URL
type that failed despite receiving a string that contained a valid URL. (#23331 by @alanhughes) (#23331 by @alanjhughes)Content-Length
header. (#23405 by @kudo)SoLoader
does not work on Android. (#23415 by @kudo)expo-network
expo-sensors
expo-speech
expo-permissions
expo-print
expo-screen-orientation
rootViewController
value. (#23039 by @gabrieldonadel)Info.plist
instead of being set to portrait. (#23456 by @behenate)expo-image-manipulator
expo-secure-store
expo-store-review
expo-sms
expo-sqlite
expo-task-manager
expo-video-thumbnails
unimodules-app-loader
expo-web-browser
expo-camera
Remote JS debugger
option from Expo Go menu when using SDK 49 or above. (#22027 by @gabrieldonadel)expo-barcode-scanner
com.google.android.gms:play-services-vision
with com.google.mlkit:barcode-scanning
. (#22107 by @toshiyuki-suzuki-yukashikado)expo-auth-session
useProxy
option. (#21313 by @gabrieldonadel)makeRedirectUriAsync
with makeRedirectUri
. (#21314 by @gabrieldonadel)promptAsync
when the useProxy
option is used. (#21367 by @gabrieldonadel)startAsync
from js doc. (#23150 by @alanhughes) (#23150 by @alanjhughes)expo-calendar
expo-document-picker
getDocumentAsync
. (#23135 by @alanjhughes)expo-gl
expo-file-system
expo-crypto
randomUUID
method. (#21187 by @KiwiKilian)expo-constants
Constants.deviceYearClass
and Constants.platform.ios.model
. These properties now live on expo-device
. (#23068 by @brentvatne)expo-linking
expo-mail-composer
expo-location
LocationRequest
constructor and replaced with LocationRequest.Builder
. (#22653 by @alanjhughes)expo-notifications
expo-screen-capture
expo-modules-core
fallbackCallback
optional in the registerForActivityResult
method. (#21661 by @lukmccall)jsi::WeakObject
for weak objects on Hermes. (#21986 by @tsapeta)proxiedProperties
prop. (#22280 by @tsapeta)JavaScriptValue.kind
public. (#22386 by @lukmccall)androidx.activity:activity-ktx
to 1.7.1
and androidx.fragment:fragment-ktx
to 1.5.7
#22658 by @fobos531ExpoReactDelegate
and ExpoReactDelegateHandler
to fix issues with versioning in Expo Go. (#23229 by @tsapeta)expo-screen-orientation
expo-secure-store
NSFaceIDUsageDescription
key in the set
function. (#23275 by @alanjhughes)expo-task-manager
defineTask
to accept type arguments. (#21958 by @kazuma0129)FAQs
Types for the Expo config object app.config.ts
The npm package @expo/config-types receives a total of 1,249,080 weekly downloads. As such, @expo/config-types popularity was classified as popular.
We found that @expo/config-types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 27 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.