ReactiveX/rxjs · error · TypeError
Object does not define a callable Symbol.iterator method
Error message
Object does not define a callable Symbol.iterator method
What it means
Error "Object does not define a callable Symbol.iterator method" thrown in ReactiveX/rxjs.
Source
Thrown at packages/observable-polyfill/src/index.ts:349
const remainder = integer % range;
return remainder < 0 ? remainder + range : remainder;
}
function getMethod(value: object, key: PropertyKey): Callable | undefined {
const method = (value as Record<PropertyKey, unknown>)[key];
if (method == null) {
return undefined;
}
if (typeof method !== 'function') {
throw new TypeError(`${String(key)} must be callable`);
}
return method as Callable;
}
function getSyncIteratorRecord<T>(value: object): SyncIteratorRecord<T> {
const iteratorMethod = getMethod(value, Symbol.iterator);
if (!iteratorMethod) {
throw new TypeError('Object does not define a callable Symbol.iterator method');
}
const iterator = iteratorMethod.call(value);
if (!isObject(iterator)) {
throw new TypeError('Symbol.iterator must return an object');
}
const next = getMethod(iterator, 'next');
if (!next) {
throw new TypeError('Iterator must define a callable next() method');
}
return { iterator, next };
}
function getAsyncIteratorRecord(value: object): AsyncIteratorRecord {
const asyncIteratorMethod = getMethod(value, Symbol.asyncIterator);
if (asyncIteratorMethod) {
const iterator = asyncIteratorMethod.call(value);View on GitHub (pinned to 54796b38a5)
When it happens
Trigger: Thrown at packages/observable-polyfill/src/index.ts:349 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ReactiveX/rxjs@54796b38a5 (2026-08-28).
Data as JSON: /api/errors/83f336e693c9dd18.
Report an issue: GitHub.