MCPcopy Index your code
hub / github.com/bombshell-dev/clack / isStringArray

Function isStringArray

examples/basic/autocomplete-multiselect.ts:63–65  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

61
62 // Type guard: if not a cancel symbol, result must be a string array
63 function isStringArray(value: unknown): value is string[] {
64 return Array.isArray(value) && value.every((item) => typeof item === 'string');
65 }
66
67 // We can now use the type guard to ensure type safety
68 if (!isStringArray(result)) {

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected