Group the sources into aliased modules and lint with the published plugins
Agents / agent (pull_request) Has been skipped
Check / check (pull_request) Successful in 38s

This commit is contained in:
Danny Kim
2026-10-18 23:50:27 +09:00
parent c8a150fee7
commit 0a9f86a102
37 changed files with 317 additions and 155 deletions
+12
View File
@@ -0,0 +1,12 @@
// Type guards for values read from JSON, which arrive as `unknown`.
export type JsonObject = NodeJS.Dict<unknown>;
// Any non-null object, arrays included: reading a missing key yields undefined.
export function isObject(value: unknown): value is JsonObject {
return typeof value === "object" && value !== null;
}
// A plain mapping, which an array is not.
export function isMapping(value: unknown): value is JsonObject {
return isObject(value) && !Array.isArray(value);
}