Skip to content

Commit f961c25

Browse files
pierre-Hdunglas
authored andcommitted
Add export to ts interfaces (#72)
* Add export to ts interfaces * fix test * fix lint
1 parent 661d310 commit f961c25

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/generators/TypescriptInterfaceGenerator.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ test("Generate a typescript interface", () => {
5050

5151
expect(fs.existsSync(tmpobj.name + "/interfaces/foo.ts")).toBe(true);
5252

53-
const res = `interface Foo {
53+
const res = `export interface Foo {
5454
'@id'?: string;
5555
id: string;
5656
foo: any;

templates/typescript/interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
interface {{ name }} {
1+
export interface {{ name }} {
22
'@id'?: string;
33
id: string;
44
{{#each fields}}

0 commit comments

Comments
 (0)