Skip to content

Commit be21603

Browse files
add types in interface
1 parent d33dfe5 commit be21603

4 files changed

Lines changed: 113 additions & 59 deletions

File tree

package-lock.json

Lines changed: 107 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/contentstack-config/src/interfaces/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,7 @@ export interface SetRateLimitConfig {
3939
default?: boolean;
4040
host?: string;
4141
}
42+
43+
export interface RegionsMap {
44+
[key: string]: Region;
45+
}

packages/contentstack-config/src/utils/region-handler.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import { configHandler } from '@contentstack/cli-utilities';
22
import { getContentstackEndpoint } from '@contentstack/utils';
3-
import { Region } from '../interfaces';
4-
interface RegionsMap {
5-
[key: string]: Region;
6-
}
3+
import { Region, RegionsMap } from '../interfaces';
74

85
function validURL(str) {
96
const pattern = new RegExp(

packages/contentstack/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"@contentstack/cli-utilities": "~1.17.1",
4141
"@contentstack/cli-variants": "~2.0.0-beta.4",
4242
"@contentstack/management": "~1.27.3",
43+
"@contentstack/utils": "~1.7.0",
4344
"@oclif/core": "^4.3.0",
4445
"@oclif/plugin-help": "^6.2.28",
4546
"@oclif/plugin-not-found": "^3.2.53",

0 commit comments

Comments
 (0)