Definitelytyped: [@types/react-native] Cannot find name 'alert'.

Created on 22 Oct 2018  路  2Comments  路  Source: DefinitelyTyped/DefinitelyTyped

If you know how to fix the issue, make a pull request instead.

  • [x ] I tried using the @types/xxxx package and had problems.
  • [x] I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript
  • [x] I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).
  • [x ] [Mention](https://github.com/blog/821-mention-somebody-they-re-notified) the authors (see Definitions by: in index.d.ts) so they can respond.

    • Authors: @Esemesek

my code

alert("333")

The TSC compiler prompt cannot find name alert,

expect:
compile success

Most helpful comment

I think you are looking for this. Global alert does not exist in react-native context.

All 2 comments

I think you are looking for this. Global alert does not exist in react-native context.

I think you are looking for this. Global alert does not exist in react-native context.

yeah, I have found it,thank you!

Was this page helpful?
0 / 5 - 0 ratings