Skip to content

Commit a7bbe1c

Browse files
committed
chore: 🔥 remove LoggerArgs interface
1 parent 2564201 commit a7bbe1c

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

scripts/logger.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,7 @@ function debug(scopes: string | string[], msg: string) {
7373
console.log()
7474
}
7575

76-
interface LoggerArgs {
77-
scope: string
78-
msg: string
79-
type: 'info' | 'success' | 'error' | 'warning' | 'debug'
80-
}
81-
82-
function list(scope: string, msg: string, list: LoggerArgs[]) {
76+
function list(scope: string, msg: string, list: any[]) {
8377
let headerType = 'success'
8478
for (const item of list) {
8579
if (item.type === 'error') {
@@ -94,7 +88,7 @@ function list(scope: string, msg: string, list: LoggerArgs[]) {
9488
else if (headerType === 'warning') warning(scope, '⚠ ' + msg)
9589
else success(scope, '✔ ' + msg)
9690

97-
list.forEach((item: LoggerArgs) => {
91+
list.forEach((item: any) => {
9892
let subScope: string
9993
if (item.type === 'error') {
10094
subScope = chalk.red('✖ ' + chalk.bold(chalk.underline(item.scope)))

scripts/verifyRelease.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@
2828
checkBuildFile(`${target} main`, mainEntryPath)
2929

3030
// verify package build
31-
interface LoggerArgs {
32-
scope: string
33-
msg: string
34-
type: 'info' | 'success' | 'error' | 'warning' | 'debug'
35-
}
3631
const packageOptions = pkg.buildOptions
3732
const buildOutputPaths: string[] = []
3833
packageOptions.formats.forEach((format: string) => {
@@ -84,7 +79,7 @@
8479

8580
function checkBuildFiles(target: string, buildPaths: string[]) {
8681
try {
87-
const buildResults: LoggerArgs[] = []
82+
const buildResults: any[] = []
8883
for (const outputPath of buildPaths) {
8984
if (fs.existsSync(outputPath)) {
9085
buildResults.push({

0 commit comments

Comments
 (0)