TypeScript declaration
See original GitHub issueNice component William,
I program using typescript, then I had to make my own “d.ts” script for your components.
Here it is, though pretty simple, hope it’s usefull:
## reactNativeExpoImageCache.d.ts
declare module 'react-native-expo-image-cache' {
import React from "react"
import { ImageStyle, ViewStyle } from "react-native"
export function Image(
style: ViewStyle & ImageStyle,
preview: string,
uri: string
): React.Component
type Listener = (uri: string) => any
export class CacheManager {
static listeners: { [uri: string]: Listener[] }
static cache: (uri: string, listener: Listener) => Promise<void>
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Documentation - Introduction - TypeScript
The Declaration Files section is designed to teach you how to write a high-quality TypeScript Declaration File. We need to assume basic familiarity...
Read more >A quick introduction to “Type Declaration” files and adding ...
We can write our own TypeScript Declaration files or have them produced from the compilation of TypeScript files ( .ts ) by setting ......
Read more >TypeScript — Type Declaration Files | by Makesh Kumar
Type declaration files are the files with d.ts extension, where types were declared via interface or type . These declaration files have no...
Read more >Declaration Files | The TypeScript Workshop
The entire reason why we use TypeScript in the first place is to give our applications a specified structure based on types. Declaration...
Read more >Declaration Files - TypeScript Deep Dive - Gitbook
Declaration Files · You can tell TypeScript that you are trying to describe code that exists elsewhere (e.g. written in JavaScript/CoffeeScript/The runtime ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

as of 12/4/2018 these typings is 1 to 1 to your own flow documentation.
@wcandillon - It would be much better if you can include it in the repo and maintain it with updates.
@typespackages often lag behind on updates for smaller libraries such as this one