Skip to content

Commit b16720e

Browse files
committed
update type syntax
1 parent 9ab8535 commit b16720e

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

scripts/configure.mjs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
#!/usr/bin/env node
22
// @ts-check
3+
/**
4+
* @import {
5+
* Configuration,
6+
* ConfigureParams,
7+
* FileCopy,
8+
* Manifest,
9+
* Platform,
10+
* PlatformConfiguration,
11+
* PlatformPackage,
12+
* } from "./types.js";
13+
*/
314
import * as nodefs from "node:fs";
415
import { createRequire } from "node:module";
516
import * as path from "node:path";
@@ -27,16 +38,6 @@ import * as colors from "./utils/colors.mjs";
2738
import { downloadPackage } from "./utils/npm.mjs";
2839
import { parseArgs } from "./utils/parseargs.mjs";
2940

30-
/**
31-
* @typedef {import("./types.js").Configuration} Configuration
32-
* @typedef {import("./types.js").ConfigureParams} ConfigureParams
33-
* @typedef {import("./types.js").FileCopy} FileCopy
34-
* @typedef {Required<import("./types.js").Manifest>} Manifest
35-
* @typedef {import("./types.js").PlatformConfiguration} PlatformConfiguration
36-
* @typedef {import("./types.js").PlatformPackage} PlatformPackage
37-
* @typedef {import("./types.js").Platform} Platform
38-
*/
39-
4041
/**
4142
* @param {...string} paths
4243
* @returns {{ source: string; }}
@@ -57,7 +58,7 @@ function mergeObjects(lhs, rhs) {
5758
: sortByKeys(rhs);
5859
}
5960

60-
/** @type {() => Manifest} */
61+
/** @type {() => Required<Manifest>} */
6162
const readManifest = memo(() =>
6263
readJSONFile(new URL("../package.json", import.meta.url))
6364
);

0 commit comments

Comments
 (0)