Skip to content

Commit a58ae3c

Browse files
committed
Remove unneeded typecasts
1 parent 891e039 commit a58ae3c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/init-app.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -91,21 +91,21 @@ export function initApp(commandLineValues: CommandLineOptions) {
9191
const COMPUTE_JS_DIR = commandLineValues.output as string;
9292
const computeJsDir = path.resolve(COMPUTE_JS_DIR);
9393

94-
const PUBLIC_DIR = options['public-dir'] as string | undefined;
94+
const PUBLIC_DIR = options['public-dir'];
9595
if(PUBLIC_DIR == null) {
9696
console.error("❌ required parameter --public-dir not provided.");
9797
process.exit(1);
9898
}
9999
const publicDir = path.resolve(PUBLIC_DIR);
100100

101-
const BUILD_STATIC_DIR = options['static-dir'] as string | undefined;
101+
const BUILD_STATIC_DIR = options['static-dir'];
102102
const buildStaticDir = BUILD_STATIC_DIR != null ? path.resolve(BUILD_STATIC_DIR) : null;
103103

104-
const spa = options['spa'] as string | null | undefined;
105-
const notFoundPage = options['not-found-page'] as string | null | undefined;
104+
const spa = options['spa'];
105+
const notFoundPage = options['not-found-page'];
106106

107-
const autoIndex = options['auto-index'] as string[] | null | undefined;
108-
const autoExt = options['auto-ext'] as string[] | null | undefined;
107+
const autoIndex = options['auto-index'];
108+
const autoExt = options['auto-ext'];
109109

110110
let spaFilename = spa;
111111

@@ -156,7 +156,7 @@ export function initApp(commandLineValues: CommandLineOptions) {
156156
const author = options['author'];
157157
const name = options['name'];
158158
const description = options['description'];
159-
const fastlyServiceId = options['service-id'] as string | undefined;
159+
const fastlyServiceId = options['service-id'];
160160

161161
let spaRel: string | null = spaFilename != null ? path.relative(path.resolve(), spaFilename) : null;
162162
if(spaRel != null && !spaRel.startsWith('..')) {

0 commit comments

Comments
 (0)