Paul O’Shannessy 55f37a1b1e Use arrow syntax for ObjectTypeProperty FunctionTypeAnnotations (#3663)
This fixes an issue where optional properties would get transformed to
an invalid syntax. The easiest solution was to make all FunctionTypes
get transformed to the arrow syntax (previously everything went the
other way).
2016-08-20 10:37:56 -04:00

21 lines
650 B
JavaScript

declare var foo
declare var foo;
declare function foo(): void
declare function foo(): void;
declare function foo<T>(): void;
declare function foo(x: number, y: string): void;
declare class A {}
declare class A<T> extends B<T> { x: number }
declare class A { static foo(): number; static x : string }
declare class A { static [ indexer: number]: string }
declare class A { static () : number }
declare class A mixins B<T>, C {}
declare type A = string
declare type T<U> = { [k:string]: U }
declare type B = {
fn?: (foo: string) => void,
}
declare interface I { foo: string }
declare interface I<T> { foo: T }
declare module.exports: { foo: string }