rrdelaney / ReasonablyTyped

:diamond_shape_with_a_dot_inside: Converts Flow and TypeScript definitions to Reason interfaces
https://rrdelaney.github.io/ReasonablyTyped/
MIT License
518 stars 24 forks source link

Modify position of `bs.string` attribute #51

Closed kogai closed 6 years ago

kogai commented 6 years ago

Modified position of bs.string attribute from a tail of definition to head of it

Sample input

declare module 'literal-type' {
  declare export function f(x: "a" | "b"): void;
}

Sample output(before)

[@bs.module "literal-type"] external f : (~x:([`a | `b] [@bs.string])) => unit = "";

Sample output(after)

[@bs.module "literal-type"] external f : (~x:([@bs.string] [`a | `b])) => unit = "";

PR Checklist