react-native-static-server
react-native-static-server copied to clipboard
Missing type definitions
This project doesn't have type definitions, which would help TypeScript users. I'll try to contribute some when I get a chance.
First incomplete draft for types:
declare module 'react-native-static-server' {
type Options = {
localOnly?: boolean
keepAlive?: boolean
}
export default class StaticServer {
constructor(port: number, root?: string, opts?: Options)
port: number
root: string
localOnly: boolean
keepAlive: boolean
started: boolean
_origin?: string
start: () => Promise<string>
stop: () => Promise<any>
isRunning: () => Promise<boolean>
kill: () => void
}
}
Any update on this?
I'm not working with React Native any more, but for anyone who's interested in contributing: instead of maintaining a separate definitions file, it might be easier to port https://github.com/futurepress/react-native-static-server/blob/master/index.js to TypeScript.