Skip to content

Commit 0443687

Browse files
authored
refactor: use export * as ns syntax (#3677)
1 parent 932cfec commit 0443687

File tree

22 files changed

+99
-161
lines changed

22 files changed

+99
-161
lines changed

packages/core-api/src/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
import * as Contracts from "./interfaces";
2-
import * as Schemas from "./schemas";
1+
export * as Contracts from "./interfaces";
2+
export * as Schemas from "./schemas";
33

44
export * from "./controllers/controller";
55
export * from "./identifiers";
66
export * from "./server";
77
export * from "./service-provider";
8-
9-
export { Contracts, Schemas };

packages/core-cli/src/index.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import * as Actions from "./actions";
2-
import * as Commands from "./commands";
3-
import * as Components from "./component-factory";
4-
import * as Contracts from "./contracts";
5-
import * as Container from "./ioc";
6-
import * as Plugins from "./plugins";
7-
import * as Services from "./services";
8-
import * as Utils from "./utils";
1+
export * as Actions from "./actions";
2+
export * as Commands from "./commands";
3+
export * as Components from "./component-factory";
4+
export * as Contracts from "./contracts";
5+
export * as Container from "./ioc";
6+
export * as Plugins from "./plugins";
7+
export * as Services from "./services";
8+
export * as Utils from "./utils";
99

1010
export * from "./application";
1111
export * from "./input";
@@ -14,5 +14,3 @@ export * from "./output";
1414
export * from "./action-factory";
1515
export * from "./application-factory";
1616
export * from "./component-factory";
17-
18-
export { Actions, Commands, Components, Container, Contracts, Plugins, Services, Utils };
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
export * from "./database-service";
22
export * from "./service-provider";
33

4-
import * as Models from "./models";
5-
import * as Repositories from "./repositories";
6-
7-
export { Models, Repositories };
4+
export * as Models from "./models";
5+
export * as Repositories from "./repositories";
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
import * as app from "./app";
2-
import * as serviceProviders from "./service-providers";
3-
4-
export { app, serviceProviders };
1+
export * as app from "./app";
2+
export * as serviceProviders from "./service-providers";
Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import * as Blockchain from "./blockchain";
2-
import * as Database from "./database";
3-
import * as Kernel from "./kernel";
4-
import * as P2P from "./p2p";
5-
import * as Search from "./search";
6-
import * as Shared from "./shared";
7-
import * as State from "./state";
8-
import * as TransactionPool from "./transaction-pool";
9-
10-
export { Blockchain, Database, Kernel, Search, P2P, Shared, State, TransactionPool };
1+
export * as Blockchain from "./blockchain";
2+
export * as Database from "./database";
3+
export * as Kernel from "./kernel";
4+
export * as P2P from "./p2p";
5+
export * as Search from "./search";
6+
export * as Shared from "./shared";
7+
export * as State from "./state";
8+
export * as TransactionPool from "./transaction-pool";
Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import * as Cache from "./cache";
2-
import * as Config from "./config";
3-
import * as Container from "./container";
4-
import * as Filesystem from "./filesystem";
5-
import * as Logic from "./logic";
6-
import * as Plugins from "./plugins";
7-
import * as Runtime from "./runtime";
8-
import * as Validation from "./validation";
9-
10-
export { Cache, Config, Container, Filesystem, Logic, Plugins, Runtime, Validation };
1+
export * as Cache from "./cache";
2+
export * as Config from "./config";
3+
export * as Container from "./container";
4+
export * as Filesystem from "./filesystem";
5+
export * as Logic from "./logic";
6+
export * as Plugins from "./plugins";
7+
export * as Runtime from "./runtime";
8+
export * as Validation from "./validation";

packages/core-kernel/src/index.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { Application } from "./application";
2-
import * as Contracts from "./contracts";
3-
import * as Enums from "./enums";
4-
import * as Exceptions from "./exceptions";
5-
import * as Container from "./ioc";
6-
import * as Providers from "./providers";
7-
import * as Services from "./services";
8-
import * as Support from "./support";
9-
import * as Types from "./types";
10-
import * as Utils from "./utils";
2+
export * as Contracts from "./contracts";
3+
export * as Enums from "./enums";
4+
export * as Exceptions from "./exceptions";
5+
export * as Container from "./ioc";
6+
export * as Providers from "./providers";
7+
export * as Services from "./services";
8+
export * as Support from "./support";
9+
export * as Types from "./types";
10+
export * as Utils from "./utils";
1111

12-
export { Application, Container, Contracts, Enums, Exceptions, Providers, Services, Support, Types, Utils };
12+
export { Application };
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import "reflect-metadata";
22

3-
import * as Selectors from "./selectors";
3+
export * as Selectors from "./selectors";
44

55
export * from "inversify";
66

77
export * from "./identifiers";
8-
export { Selectors };
Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import * as Attributes from "./attributes";
2-
import * as Cache from "./cache";
3-
import * as Config from "./config";
4-
import * as Events from "./events";
5-
import * as Filesystem from "./filesystem";
6-
import * as Log from "./log";
7-
import * as Pipeline from "./pipeline";
8-
import * as Queue from "./queue";
9-
import * as Schedule from "./schedule";
10-
import * as Triggers from "./triggers";
11-
import * as Validation from "./validation";
12-
13-
export { Attributes, Cache, Config, Events, Filesystem, Log, Pipeline, Queue, Schedule, Triggers, Validation };
1+
export * as Attributes from "./attributes";
2+
export * as Cache from "./cache";
3+
export * as Config from "./config";
4+
export * as Events from "./events";
5+
export * as Filesystem from "./filesystem";
6+
export * as Log from "./log";
7+
export * as Pipeline from "./pipeline";
8+
export * as Queue from "./queue";
9+
export * as Schedule from "./schedule";
10+
export * as Triggers from "./triggers";
11+
export * as Validation from "./validation";

packages/core-kernel/src/utils/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import { getBlockTimeLookup } from "./get-blocktime-lookup";
66
import { getBlockNotChainedErrorMessage, isBlockChained } from "./is-block-chained";
77
import { isWhitelisted } from "./is-whitelisted";
88
import { calculateRound, isNewRound } from "./round-calculator";
9-
import * as Search from "./search";
9+
export * as Search from "./search";
1010
import { calculate } from "./supply-calculator";
11-
import * as Plugins from "./transform-plugins";
11+
export * as Plugins from "./transform-plugins";
1212

1313
export * from "@arkecosystem/utils";
1414
export * from "./expiration-calculator";
@@ -20,4 +20,4 @@ export const roundCalculator = { calculateRound, isNewRound };
2020
export const supplyCalculator = { calculate };
2121
export const forgingInfoCalculator = { calculateForgingInfo, getBlockTimeLookup };
2222

23-
export { formatTimestamp, isBlockChained, getBlockNotChainedErrorMessage, isWhitelisted, Search, Plugins };
23+
export { formatTimestamp, isBlockChained, getBlockNotChainedErrorMessage, isWhitelisted };

0 commit comments

Comments
 (0)