1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 1x 32x 23x 9x 32x 3x 22x | export class DOMTokenList extends Array<string> { readonly value: string; constructor(value: string){ if (value){ super(...value.split(' ')); } else { super(0); } this.value = value; } item(n: number): string { return this[n]; } contains(token: string): boolean { return this.indexOf(token) >= 0; } } |