ljharb / es-abstract

ECMAScript spec abstract operations.
MIT License
115 stars 30 forks source link

Unknown record type: function Type(x) #153

Closed DemonICOLI closed 8 months ago

DemonICOLI commented 8 months ago

Hey!

Just getting the following error while using the latest 1.22.4 release.

Stack Trace error is the following:

ESLint: 8.56.0

SyntaxError: Error while loading rule 'react/display-name': unknown record type: function Type(x) {
    if (typeof x === 'symbol') {
        return 'Symbol';
    }
    if (typeof x === 'bigint') {
        return 'BigInt';
    }
    return ES5Type(x);
}

Occurred while linting /home/runner/work/platform/platform/src/@types/google-map-react.d.ts
    at assertRecord (/home/runner/work/platform/platform/node_modules/es-abstract/helpers/assertRecord.js:27:9)
    at IteratorStepValue (/home/runner/work/platform/platform/node_modules/es-iterator-helpers/aos/IteratorStepValue.js:13:2)
    at closure (/home/runner/work/platform/platform/node_modules/es-iterator-helpers/Iterator.prototype.map/implementation.js:49:15)
    at /home/runner/work/platform/platform/node_modules/es-iterator-helpers/aos/GeneratorStart.js:28:17
    at GeneratorResume (/home/runner/work/platform/platform/node_modules/es-iterator-helpers/aos/GeneratorResume.js:24:15)
    at Iterator Helper.next (/home/runner/work/platform/platform/node_modules/es-iterator-helpers/IteratorHelperPrototype/index.js:20:11)
    at Function.fromEntries (<anonymous>)
    at mergeRules (/home/runner/work/platform/platform/node_modules/eslint-plugin-react/lib/util/Components.js:273:10)
    at Components.componentRule (/home/runner/work/platform/platform/node_modules/eslint-plugin-react/lib/util/Components.js:930:22)
    at createRuleListeners (/home/runner/work/platform/platform/node_modules/eslint/lib/linter/linter.js:895:21)
ljharb commented 8 months ago

Thanks; this is a duplicate of https://github.com/es-shims/iterator-helpers/issues/5 and is fixed in v1.0.17 of es-iterator-helpers as of a few minutes ago; update your deps and it should all be fine.