Skip to content

React Native 69 will use iOS 12.4 as minimal version but we still recommends es2017 in TS config  #3167

Description

@retyui

Description

Can we recommend a "lib": ["es2019"] for react-native@0.69.x and above in tsconfig.json ?

What is the problem?

We still recommend to use es2017 for ts config, but with a new minimal iOS version requirements (12.4)

// iOS 11
Intl.PluralRules // undefined (es2018.intl)
Symbol.asyncIterator // undefined (es2018.asynciterable)
String.prototype.trimStart // undefined (es2019.string)
String.prototype.trimEnd // undefined (es2019.string)
Object.fromEntries // undefined (es2019.object)
Array.prototype.flat // undefined (es2019.array)
Array.prototype.flatMap // undefined (es2019.array)

// iOS 12.4
Intl.PluralRules // function
Symbol.asyncIterator // Symbol(Symbol.asyncIterator)
String.prototype.trimStart // function
String.prototype.trimEnd // function
Object.fromEntries // function
Array.prototype.flat // function
Array.prototype.flatMap // function

Links

How can we address it?


Why is it important?

Users will be sure that it's safety to use modern JavaScript features and it won't cause crash in runtime

Who needs this?

TypeScript users

When should this happen (use version numbers if needed)?

React Native 0.69.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions