MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / tryGetIterableType

Method tryGetIterableType

packages/alphatab/test/PrettyFormat.ts:149–176  ·  view source on GitHub ↗
(val: unknown)

Source from the content-addressed store, hash-verified

147 }
148
149 static tryGetIterableType(val: unknown): string {
150 if (val instanceof Float32Array) {
151 return 'Float32Array';
152 }
153 if (val instanceof Int16Array) {
154 return 'Int16Array';
155 }
156 if (val instanceof Int32Array) {
157 return 'Int32Array';
158 }
159 if (val instanceof Uint8Array) {
160 return 'Uint8Array';
161 }
162 if (val instanceof Uint16Array) {
163 return 'Uint16Array';
164 }
165 if (val instanceof Uint32Array) {
166 return 'Uint32Array';
167 }
168 if (Array.isArray(val)) {
169 return '_Array';
170 }
171 if (val instanceof Set) {
172 return 'Set';
173 }
174
175 return '';
176 }
177
178 /**
179 * Handles more complex objects ( such as objects with circular references.

Callers 1

printComplexValueMethod · 0.80

Calls 1

isArrayMethod · 0.80

Tested by

no test coverage detected