-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
What is this? This PR continues the work on making this project type safe with TypeScript. Goal is that the flag noImplicitAny will be set to true What this PR does? * all files inside adapter folder is valid for noImplicitAny! * resolveAssetSource is now imported from the current place where it should. Previously it was imported from legacy location. More info here: https://facebook.github.io/react-native/docs/image#resolveassetsource * formatted many files * add missing interfaces * fix onPressIn prop on TouchablePreview What's next? Next I am planning to make same treatment for commands folder and many it valid for noImplicitAny 🎉
- Loading branch information
Showing
6 changed files
with
61 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
import * as resolveAssetSource from 'react-native/Libraries/Image/resolveAssetSource'; | ||
import { ImageRequireSource } from 'react-native'; | ||
import { ImageRequireSource, Image } from 'react-native'; | ||
|
||
export class AssetService { | ||
resolveFromRequire(value: ImageRequireSource) { | ||
return resolveAssetSource(value); | ||
return Image.resolveAssetSource(value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters