Skip to content

Commit a4834d6

Browse files
committed
chore: use isolatedModules for types
1 parent 02d5abf commit a4834d6

98 files changed

Lines changed: 570 additions & 326 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
// Uses the recommended rules from the @typescript-eslint/eslint-plugin
99
"plugin:@typescript-eslint/recommended",
1010
],
11-
plugins: ["@typescript-eslint", "simple-import-sort", "eslint-plugin-sort-export-all", "eslint-plugin-tsdoc", "n"],
11+
plugins: ["@typescript-eslint", "simple-import-sort", "eslint-plugin-tsdoc", "n"],
1212
rules: {
1313
/** Turn off strict enforcement */
1414
"@typescript-eslint/ban-types": "off",
@@ -27,7 +27,6 @@ module.exports = {
2727

2828
/** Errors */
2929
"simple-import-sort/imports": "error",
30-
"sort-export-all/sort-export-all": "error",
3130
"@typescript-eslint/consistent-type-imports": "error",
3231
"n/prefer-node-protocol": "error",
3332
},
@@ -50,6 +49,13 @@ module.exports = {
5049
"private/*/src/**/*.ts",
5150
],
5251
rules: {
52+
"no-restricted-syntax": [
53+
"error",
54+
{
55+
selector: "ExportAllDeclaration",
56+
message: "Use explicit named exports (export { X } or export type { X }) instead of 'export *'.",
57+
},
58+
],
5359
"no-restricted-imports": [
5460
"error",
5561
{
@@ -191,5 +197,15 @@ module.exports = {
191197
"n/prefer-node-protocol": "error",
192198
},
193199
},
200+
{
201+
files: [
202+
"packages-internal/nested-clients/src/submodules/**/index.ts",
203+
"packages-internal/nested-clients/src/submodules/**/commands/index.ts",
204+
"clients/*/src/**/*.ts",
205+
],
206+
rules: {
207+
"no-restricted-syntax": "off",
208+
},
209+
},
194210
],
195211
};

lib/lib-dynamodb/tsconfig.types.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"rootDir": "src",
66
"paths": {
77
"@smithy/core/*": ["../../node_modules/@smithy/core/dist-types/submodules/*/index.d.ts"]
8-
}
8+
},
9+
"isolatedModules": false
910
},
1011
"extends": "../../tsconfig.types.json",
1112
"include": ["src/"]

lib/lib-storage/src/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
export * from "./Upload";
2-
export * from "./types";
1+
export { Upload } from "./Upload";
2+
export type { RawDataPart } from "./Upload";
3+
export type { Progress, BodyDataTypes, ServiceClients, Configuration, Options } from "./types";

packages-internal/core/src/api-extractor-type-index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-restricted-syntax */
12
export * from "./submodules/account-id-endpoint/index";
23
export * from "./submodules/client/index";
34
export * from "./submodules/httpAuthSchemes/index";
Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1-
export * from "./AccountIdEndpointModeConfigResolver";
2-
export * from "./AccountIdEndpointModeConstants";
3-
export * from "./NodeAccountIdEndpointModeConfigOptions";
1+
export { resolveAccountIdEndpointModeConfig } from "./AccountIdEndpointModeConfigResolver";
2+
export type {
3+
AccountIdEndpointModeInputConfig,
4+
AccountIdEndpointModeResolvedConfig,
5+
} from "./AccountIdEndpointModeConfigResolver";
6+
export {
7+
DEFAULT_ACCOUNT_ID_ENDPOINT_MODE,
8+
ACCOUNT_ID_ENDPOINT_MODE_VALUES,
9+
validateAccountIdEndpointMode,
10+
} from "./AccountIdEndpointModeConstants";
11+
export type { AccountIdEndpointMode } from "./AccountIdEndpointModeConstants";
12+
export {
13+
ENV_ACCOUNT_ID_ENDPOINT_MODE,
14+
CONFIG_ACCOUNT_ID_ENDPOINT_MODE,
15+
NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS,
16+
} from "./NodeAccountIdEndpointModeConfigOptions";

packages-internal/core/src/submodules/client/index.browser.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,15 @@ export {
6565
} from "./util-endpoints/lib/aws/partition";
6666
export type { PartitionsInfo } from "./util-endpoints/lib/aws/partition";
6767
export { EndpointError } from "./util-endpoints/types/EndpointError";
68-
export {
68+
export type {
6969
EndpointObjectProperties,
7070
EndpointObjectHeaders,
7171
EndpointObject,
72-
EndpointRuleObject,
7372
} from "./util-endpoints/types/EndpointRuleObject";
74-
export { ErrorRuleObject } from "./util-endpoints/types/ErrorRuleObject";
75-
export { RuleSetRules, TreeRuleObject } from "./util-endpoints/types/TreeRuleObject";
76-
export { DeprecatedObject, ParameterObject, RuleSetObject } from "./util-endpoints/types/RuleSetObject";
77-
export {
73+
export type { ErrorRuleObject } from "./util-endpoints/types/ErrorRuleObject";
74+
export type { RuleSetRules } from "./util-endpoints/types/TreeRuleObject";
75+
export type { DeprecatedObject, ParameterObject } from "./util-endpoints/types/RuleSetObject";
76+
export type {
7877
ReferenceObject,
7978
FunctionObject,
8079
FunctionArgv,

packages-internal/core/src/submodules/client/index.native.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,15 @@ export {
6666
} from "./util-endpoints/lib/aws/partition";
6767
export type { PartitionsInfo } from "./util-endpoints/lib/aws/partition";
6868
export { EndpointError } from "./util-endpoints/types/EndpointError";
69-
export {
69+
export type {
7070
EndpointObjectProperties,
7171
EndpointObjectHeaders,
7272
EndpointObject,
73-
EndpointRuleObject,
7473
} from "./util-endpoints/types/EndpointRuleObject";
75-
export { ErrorRuleObject } from "./util-endpoints/types/ErrorRuleObject";
76-
export { RuleSetRules, TreeRuleObject } from "./util-endpoints/types/TreeRuleObject";
77-
export { DeprecatedObject, ParameterObject, RuleSetObject } from "./util-endpoints/types/RuleSetObject";
78-
export {
74+
export type { ErrorRuleObject } from "./util-endpoints/types/ErrorRuleObject";
75+
export type { RuleSetRules } from "./util-endpoints/types/TreeRuleObject";
76+
export type { DeprecatedObject, ParameterObject } from "./util-endpoints/types/RuleSetObject";
77+
export type {
7978
ReferenceObject,
8079
FunctionObject,
8180
FunctionArgv,

packages-internal/core/src/submodules/client/index.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,15 @@ export {
6969
export type { PartitionsInfo } from "./util-endpoints/lib/aws/partition";
7070
// util-endpoints types (re-exports from @smithy/core/endpoints)
7171
export { EndpointError } from "./util-endpoints/types/EndpointError";
72-
export {
72+
export type {
7373
EndpointObjectProperties,
7474
EndpointObjectHeaders,
7575
EndpointObject,
76-
EndpointRuleObject,
7776
} from "./util-endpoints/types/EndpointRuleObject";
78-
export { ErrorRuleObject } from "./util-endpoints/types/ErrorRuleObject";
79-
export { RuleSetRules, TreeRuleObject } from "./util-endpoints/types/TreeRuleObject";
80-
export { DeprecatedObject, ParameterObject, RuleSetObject } from "./util-endpoints/types/RuleSetObject";
81-
export {
77+
export type { ErrorRuleObject } from "./util-endpoints/types/ErrorRuleObject";
78+
export type { RuleSetRules } from "./util-endpoints/types/TreeRuleObject";
79+
export type { DeprecatedObject, ParameterObject } from "./util-endpoints/types/RuleSetObject";
80+
export type {
8281
ReferenceObject,
8382
FunctionObject,
8483
FunctionArgv,

packages-internal/core/src/submodules/client/util-endpoints/types/EndpointRuleObject.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export {
1+
export type {
22
EndpointObjectProperties,
33
EndpointObjectHeaders,
44
EndpointObject,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { ErrorRuleObject } from "@smithy/core/endpoints";
1+
export type { ErrorRuleObject } from "@smithy/core/endpoints";

0 commit comments

Comments
 (0)