Skip to content

Commit

Permalink
unify export syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandrpravosudko-okta committed Feb 16, 2021
1 parent 34cfc19 commit 59c916f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ import Client from './generated-client';

export {
Client,
}
}
3 changes: 2 additions & 1 deletion src/types/resource.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export = Resource;
/*!
* Copyright (c) 2017-2021, Okta, Inc. and/or its affiliates. All rights reserved.
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
Expand All @@ -14,3 +13,5 @@ export = Resource;
declare class Resource {
constructor(resourceJson: any, client: any);
}

export default Resource;
4 changes: 2 additions & 2 deletions templates/generated-client.d.ts.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Copyright (c) 2017-2020, Okta, Inc. and/or its affiliates. All rights reserved.
* Copyright (c) 2017-2021, Okta, Inc. and/or its affiliates. All rights reserved.
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
*
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
Expand All @@ -18,4 +18,4 @@ declare class GeneratedApiClient {
{{/each}}
}

export = GeneratedApiClient;
export default GeneratedApiClient;
Empty file removed templates/helpers/model.js
Empty file.
15 changes: 0 additions & 15 deletions templates/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,6 @@ js.process = ({spec, operations, models, handlebars}) => {
propertyName: model.resolutionStrategy.propertyName
}
});
templates.push({
src: 'factory.d.ts.hbs',
dest: `src/types/factories/${model.modelName}Factory.d.ts`,
context: {
parentModelName: model.modelName,
mapping,
propertyName: model.resolutionStrategy.propertyName
}
});
}
}

Expand All @@ -120,12 +111,6 @@ js.process = ({spec, operations, models, handlebars}) => {
context: { models: models.filter(model => model.requiresResolution) }
});

templates.push({
src: 'factories.index.d.ts.hbs',
dest: 'src/types/factories/index.d.ts',
context: { models: models.filter(model => model.requiresResolution) }
});

// Add helpers

// Register Operation helpers
Expand Down

0 comments on commit 59c916f

Please sign in to comment.