Skip to content
This repository was archived by the owner on Nov 13, 2023. It is now read-only.

Commit 7c20218

Browse files
committed
No need to use different names for variant conversion, now that renaming happens for all variables.
1 parent 164f763 commit 7c20218

File tree

12 files changed

+30
-32
lines changed

12 files changed

+30
-32
lines changed

examples/flow-react-example/src/AutoAnnotate.gen.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import * as ReasonReact from 'reason-react/src/ReasonReact.js';
1818

1919
export opaque type VariantR = mixed;
2020

21-
export const R: (number) => VariantR = function _(VArg1) { return CreateBucklescriptBlock.__(0, [VArg1]) }
21+
export const R: (number) => VariantR = function _(Arg1) { return CreateBucklescriptBlock.__(0, [Arg1]) }
2222

2323
export type variant =
2424
| VariantR;
@@ -33,11 +33,11 @@ export type r4 = {|+r4: number|};
3333

3434
export opaque type AnnotatedVariantR2 = mixed;
3535

36-
export const R2: (r2, r3) => AnnotatedVariantR2 = function _(VArg1, VArg2) { return CreateBucklescriptBlock.__(0, [[VArg1.r2], [VArg2.r3]]) }
36+
export const R2: (r2, r3) => AnnotatedVariantR2 = function _(Arg1, Arg2) { return CreateBucklescriptBlock.__(0, [[Arg1.r2], [Arg2.r3]]) }
3737

3838
export opaque type AnnotatedVariantR4 = mixed;
3939

40-
export const R4: (r4) => AnnotatedVariantR4 = function _(VArg1) { return CreateBucklescriptBlock.__(1, [[VArg1.r4]]) }
40+
export const R4: (r4) => AnnotatedVariantR4 = function _(Arg1) { return CreateBucklescriptBlock.__(1, [[Arg1.r4]]) }
4141

4242
export type annotatedVariant =
4343
| AnnotatedVariantR2

examples/flow-react-example/src/Component2.gen.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ export const A: VariantA = 0;
1616

1717
export opaque type VariantB = mixed;
1818

19-
export const B: (number, number) => VariantB = function _(VArg1, VArg2) { return CreateBucklescriptBlock.__(0, [VArg1, VArg2]) }
19+
export const B: (number, number) => VariantB = function _(Arg1, Arg2) { return CreateBucklescriptBlock.__(0, [Arg1, Arg2]) }
2020

2121
export opaque type VariantC = mixed;
2222

23-
export const C: (?number) => VariantC = function _(VArg1) { return CreateBucklescriptBlock.__(1, [(VArg1 == null ? undefined : VArg1)]) }
23+
export const C: (?number) => VariantC = function _(Arg1) { return CreateBucklescriptBlock.__(1, [(Arg1 == null ? undefined : Arg1)]) }
2424

2525
export type variant =
2626
| VariantA

examples/flow-react-example/src/Types.gen.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ import type {weekday} from './SomeFlowTypes';
3636

3737
export opaque type TypeWithVarsA<x,y> = mixed;
3838

39-
export const A: <x,y>(x, y) => TypeWithVarsA<x,y> = function _(VArg1, VArg2) { return CreateBucklescriptBlock.__(0, [VArg1, VArg2]) }
39+
export const A: <x,y>(x, y) => TypeWithVarsA<x,y> = function _(Arg1, Arg2) { return CreateBucklescriptBlock.__(0, [Arg1, Arg2]) }
4040

4141
export opaque type TypeWithVarsB<z> = mixed;
4242

43-
export const B: <z>(z) => TypeWithVarsB<z> = function _(VArg1) { return CreateBucklescriptBlock.__(1, [VArg1]) }
43+
export const B: <z>(z) => TypeWithVarsB<z> = function _(Arg1) { return CreateBucklescriptBlock.__(1, [Arg1]) }
4444

4545
export type typeWithVars<x,y,z> =
4646
| TypeWithVarsA<x,y>

examples/flow-react-example/src/Variants.gen.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,27 @@ export const NoOp: ActionNoOp = 0;
1616

1717
export opaque type ActionAdjustAge = mixed;
1818

19-
export const AdjustAge: (((number) => number)) => ActionAdjustAge = function _(VArg1) { return CreateBucklescriptBlock.__(0, [VArg1]) }
19+
export const AdjustAge: (((number) => number)) => ActionAdjustAge = function _(Arg1) { return CreateBucklescriptBlock.__(0, [Arg1]) }
2020

2121
export opaque type ActionBooly = mixed;
2222

23-
export const Booly: (boolean) => ActionBooly = function _(VArg1) { return CreateBucklescriptBlock.__(1, [VArg1]) }
23+
export const Booly: (boolean) => ActionBooly = function _(Arg1) { return CreateBucklescriptBlock.__(1, [Arg1]) }
2424

2525
export opaque type ActionOptionalInt = mixed;
2626

27-
export const OptionalInt: (?number) => ActionOptionalInt = function _(VArg1) { return CreateBucklescriptBlock.__(2, [(VArg1 == null ? undefined : VArg1)]) }
27+
export const OptionalInt: (?number) => ActionOptionalInt = function _(Arg1) { return CreateBucklescriptBlock.__(2, [(Arg1 == null ? undefined : Arg1)]) }
2828

2929
export opaque type ActionUnity = mixed;
3030

31-
export const Unity: (void) => ActionUnity = function _(VArg1) { return CreateBucklescriptBlock.__(3, [VArg1]) }
31+
export const Unity: (void) => ActionUnity = function _(Arg1) { return CreateBucklescriptBlock.__(3, [Arg1]) }
3232

3333
export opaque type ActionOptionalBooly = mixed;
3434

35-
export const OptionalBooly: (?boolean) => ActionOptionalBooly = function _(VArg1) { return CreateBucklescriptBlock.__(4, [(VArg1 == null ? undefined : VArg1)]) }
35+
export const OptionalBooly: (?boolean) => ActionOptionalBooly = function _(Arg1) { return CreateBucklescriptBlock.__(4, [(Arg1 == null ? undefined : Arg1)]) }
3636

3737
export opaque type ActionOptionalBoolMapper = mixed;
3838

39-
export const OptionalBoolMapper: (((?boolean) => ?boolean)) => ActionOptionalBoolMapper = function _(VArg1) { return CreateBucklescriptBlock.__(5, [function _(Arg1) { const result = VArg1(Arg1); return (result == null ? undefined : result) }]) }
39+
export const OptionalBoolMapper: (((?boolean) => ?boolean)) => ActionOptionalBoolMapper = function _(Arg1) { return CreateBucklescriptBlock.__(5, [function _(Arg11) { const result = Arg1(Arg11); return (result == null ? undefined : result) }]) }
4040

4141
export type action =
4242
| ActionNoOp

examples/flow-react-example/src/nested/Nested.gen.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ export const A: VariantA = 0;
1919

2020
export opaque type VariantB = mixed;
2121

22-
export const B: (number, number) => VariantB = function _(VArg1, VArg2) { return CreateBucklescriptBlock.__(0, [VArg1, VArg2]) }
22+
export const B: (number, number) => VariantB = function _(Arg1, Arg2) { return CreateBucklescriptBlock.__(0, [Arg1, Arg2]) }
2323

2424
export opaque type VariantC = mixed;
2525

26-
export const C: (?number) => VariantC = function _(VArg1) { return CreateBucklescriptBlock.__(1, [(VArg1 == null ? undefined : VArg1)]) }
26+
export const C: (?number) => VariantC = function _(Arg1) { return CreateBucklescriptBlock.__(1, [(Arg1 == null ? undefined : Arg1)]) }
2727

2828
export type variant =
2929
| VariantA

examples/typescript-react-example/src/AutoAnnotate.gen.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const CreateBucklescriptBlock = require('bs-platform/lib/es6/block.js');
66
// tslint:disable-next-line:max-classes-per-file
77
export abstract class VariantR { protected opaque!: any }; /* simulate opaque types */
88

9-
export const R: (_1:number) => VariantR = function _(VArg1) { return CreateBucklescriptBlock.__(0 as any, [VArg1]) }
9+
export const R: (_1:number) => VariantR = function _(Arg1) { return CreateBucklescriptBlock.__(0 as any, [Arg1]) }
1010

1111
export type variant =
1212
| VariantR;
@@ -26,12 +26,12 @@ export type r4 = {readonly r4: number};
2626
// tslint:disable-next-line:max-classes-per-file
2727
export abstract class AnnotatedVariantR2 { protected opaque!: any }; /* simulate opaque types */
2828

29-
export const R2: (_1:r2, _2:r3) => AnnotatedVariantR2 = function _(VArg1, VArg2) { return CreateBucklescriptBlock.__(0 as any, [[VArg1.r2], [VArg2.r3]]) }
29+
export const R2: (_1:r2, _2:r3) => AnnotatedVariantR2 = function _(Arg1, Arg2) { return CreateBucklescriptBlock.__(0 as any, [[Arg1.r2], [Arg2.r3]]) }
3030

3131
// tslint:disable-next-line:max-classes-per-file
3232
export abstract class AnnotatedVariantR4 { protected opaque!: any }; /* simulate opaque types */
3333

34-
export const R4: (_1:r4) => AnnotatedVariantR4 = function _(VArg1) { return CreateBucklescriptBlock.__(1 as any, [[VArg1.r4]]) }
34+
export const R4: (_1:r4) => AnnotatedVariantR4 = function _(Arg1) { return CreateBucklescriptBlock.__(1 as any, [[Arg1.r4]]) }
3535

3636
export type annotatedVariant =
3737
| AnnotatedVariantR2

examples/typescript-react-example/src/NestedModules.gen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const Universe_A: Universe_VariantA = 0 as any;
2323
// tslint:disable-next-line:max-classes-per-file
2424
export abstract class Universe_VariantB { protected opaque!: any }; /* simulate opaque types */
2525

26-
export const Universe_B: (_1:string) => Universe_VariantB = function _(VArg1) { return CreateBucklescriptBlock.__(0 as any, [VArg1]) }
26+
export const Universe_B: (_1:string) => Universe_VariantB = function _(Arg1) { return CreateBucklescriptBlock.__(0 as any, [Arg1]) }
2727

2828
export type Universe_variant =
2929
| Universe_VariantA

examples/typescript-react-example/src/ReasonComponent.gen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ export const A: TA = 0 as any;
3636
// tslint:disable-next-line:max-classes-per-file
3737
export abstract class TB { protected opaque!: any }; /* simulate opaque types */
3838

39-
export const B: (_1:number) => TB = function _(VArg1) { return CreateBucklescriptBlock.__(0 as any, [VArg1]) }
39+
export const B: (_1:number) => TB = function _(Arg1) { return CreateBucklescriptBlock.__(0 as any, [Arg1]) }
4040

4141
// tslint:disable-next-line:max-classes-per-file
4242
export abstract class TC { protected opaque!: any }; /* simulate opaque types */
4343

44-
export const C: (_1:string) => TC = function _(VArg1) { return CreateBucklescriptBlock.__(1 as any, [VArg1]) }
44+
export const C: (_1:string) => TC = function _(Arg1) { return CreateBucklescriptBlock.__(1 as any, [Arg1]) }
4545

4646
export type t =
4747
| TA

examples/typescript-react-example/src/Variants.gen.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,32 @@ export const NoOp: ActionNoOp = 0 as any;
1414
// tslint:disable-next-line:max-classes-per-file
1515
export abstract class ActionAdjustAge { protected opaque!: any }; /* simulate opaque types */
1616

17-
export const AdjustAge: (_1:((_1:number) => number)) => ActionAdjustAge = function _(VArg1) { return CreateBucklescriptBlock.__(0 as any, [VArg1]) }
17+
export const AdjustAge: (_1:((_1:number) => number)) => ActionAdjustAge = function _(Arg1) { return CreateBucklescriptBlock.__(0 as any, [Arg1]) }
1818

1919
// tslint:disable-next-line:max-classes-per-file
2020
export abstract class ActionBooly { protected opaque!: any }; /* simulate opaque types */
2121

22-
export const Booly: (_1:boolean) => ActionBooly = function _(VArg1) { return CreateBucklescriptBlock.__(1 as any, [VArg1]) }
22+
export const Booly: (_1:boolean) => ActionBooly = function _(Arg1) { return CreateBucklescriptBlock.__(1 as any, [Arg1]) }
2323

2424
// tslint:disable-next-line:max-classes-per-file
2525
export abstract class ActionOptionalInt { protected opaque!: any }; /* simulate opaque types */
2626

27-
export const OptionalInt: (_1:(null | undefined | number)) => ActionOptionalInt = function _(VArg1) { return CreateBucklescriptBlock.__(2 as any, [(VArg1 == null ? undefined : VArg1)]) }
27+
export const OptionalInt: (_1:(null | undefined | number)) => ActionOptionalInt = function _(Arg1) { return CreateBucklescriptBlock.__(2 as any, [(Arg1 == null ? undefined : Arg1)]) }
2828

2929
// tslint:disable-next-line:max-classes-per-file
3030
export abstract class ActionUnity { protected opaque!: any }; /* simulate opaque types */
3131

32-
export const Unity: (_1:void) => ActionUnity = function _(VArg1) { return CreateBucklescriptBlock.__(3 as any, [VArg1]) }
32+
export const Unity: (_1:void) => ActionUnity = function _(Arg1) { return CreateBucklescriptBlock.__(3 as any, [Arg1]) }
3333

3434
// tslint:disable-next-line:max-classes-per-file
3535
export abstract class ActionOptionalBooly { protected opaque!: any }; /* simulate opaque types */
3636

37-
export const OptionalBooly: (_1:(null | undefined | boolean)) => ActionOptionalBooly = function _(VArg1) { return CreateBucklescriptBlock.__(4 as any, [(VArg1 == null ? undefined : VArg1)]) }
37+
export const OptionalBooly: (_1:(null | undefined | boolean)) => ActionOptionalBooly = function _(Arg1) { return CreateBucklescriptBlock.__(4 as any, [(Arg1 == null ? undefined : Arg1)]) }
3838

3939
// tslint:disable-next-line:max-classes-per-file
4040
export abstract class ActionOptionalBoolMapper { protected opaque!: any }; /* simulate opaque types */
4141

42-
export const OptionalBoolMapper: (_1:((_1:(null | undefined | boolean)) => (null | undefined | boolean))) => ActionOptionalBoolMapper = function _(VArg1) { return CreateBucklescriptBlock.__(5 as any, [function _(Arg1: any) { const result = VArg1(Arg1); return (result == null ? undefined : result) }]) }
42+
export const OptionalBoolMapper: (_1:((_1:(null | undefined | boolean)) => (null | undefined | boolean))) => ActionOptionalBoolMapper = function _(Arg1) { return CreateBucklescriptBlock.__(5 as any, [function _(Arg11: any) { const result = Arg1(Arg11); return (result == null ? undefined : result) }]) }
4343

4444
export type action =
4545
| ActionNoOp

examples/typescript-react-example/src/nested/Types.gen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ export type t = number;
1414
// tslint:disable-next-line:max-classes-per-file
1515
export abstract class TypeWithVarsA<x,y> { protected opaque!: x | y }; /* simulate opaque types */
1616

17-
export const A: <x,y>(_1:x, _2:y) => TypeWithVarsA<x,y> = function _(VArg1, VArg2) { return CreateBucklescriptBlock.__(0 as any, [VArg1, VArg2]) }
17+
export const A: <x,y>(_1:x, _2:y) => TypeWithVarsA<x,y> = function _(Arg1, Arg2) { return CreateBucklescriptBlock.__(0 as any, [Arg1, Arg2]) }
1818

1919
// tslint:disable-next-line:max-classes-per-file
2020
export abstract class TypeWithVarsB<z> { protected opaque!: z }; /* simulate opaque types */
2121

22-
export const B: <z>(_1:z) => TypeWithVarsB<z> = function _(VArg1) { return CreateBucklescriptBlock.__(1 as any, [VArg1]) }
22+
export const B: <z>(_1:z) => TypeWithVarsB<z> = function _(Arg1) { return CreateBucklescriptBlock.__(1 as any, [Arg1]) }
2323

2424
export type typeWithVars<x,y,z> =
2525
| TypeWithVarsA<x,y>

0 commit comments

Comments
 (0)