Skip to content

Commit b531f1e

Browse files
committed
fix(alita): 移除init typescript 的项目 null 报错的问题
1 parent 464f5c4 commit b531f1e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

rn-typescript-template/src/HelloWorld.tsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@ import {AnimatedImage, createAnimation} from '@areslabs/wx-animated'
2121
*/
2222
import {camelCase} from '@areslabs/stringutil-rn'
2323

24-
import rnLogoPng from './rn_logo.png'
25-
24+
const rnLogoPng = require('./rn_logo.png')
2625

2726
interface IState {
28-
logoAni: object,
27+
logoAni: object | null
2928
}
3029

31-
export default class HelloWorld extends Component<{}, IState> {
30+
interface IProps {}
31+
32+
export default class HelloWorld extends Component<IProps, IState> {
3233

3334
state = {
3435
logoAni: null,

0 commit comments

Comments
 (0)