(id: unknown, spec: string)
| 262 | } |
| 263 | |
| 264 | export function readPluginId(id: unknown, spec: string) { |
| 265 | if (id === undefined) return |
| 266 | if (typeof id !== "string") throw new TypeError(`Plugin ${spec} has invalid id type ${typeof id}`) |
| 267 | const value = id.trim() |
| 268 | if (!value) throw new TypeError(`Plugin ${spec} has an empty id`) |
| 269 | return value |
| 270 | } |
| 271 | |
| 272 | export function readV1Plugin( |
| 273 | mod: Record<string, unknown>, |
no outgoing calls
no test coverage detected