mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2026-07-16 09:57:21 +02:00
8 lines
224 B
TypeScript
8 lines
224 B
TypeScript
export class StringArray<T extends string> extends Array<T> {
|
|
constructor(str: string) {
|
|
super();
|
|
const parsed = str.split(',') as StringArray<T>;
|
|
return parsed.every((i) => typeof i === 'string') ? parsed : [];
|
|
}
|
|
}
|