Implement transform class to declare class.
For example
// @flow
class URL<T> {
urlStr: string;
constructor(urlStr: string): URL {
this.urlStr = urlStr;
}
toString(): string {
return this.urlStr;
}
render() {}
static compare(url1: URL, url2: URL): boolean {
return url1 === url2;
}
}
will be transformed to
// @flow
declare class URL<T> {
urlStr: string,
constructor(urlStr: string): URL,
toString(): string,
render(): any,
static compare(url1: URL, url2: URL): boolean,
}