We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function safeFindIndex<T extends object>( array: ReadonlyArray<T>, matcher: Partial<T>, recordName: string, assertMatcher: Partial<T> | undefined ): number { const index = findIndex(array, matcher) // ERROR HERE: immutable-array.ts:21 if (index === -1) { reportError(new TypeError(`Couldn't find ${recordName}`), { extra: { matcher } }) } else { const found = array[index] if (assertMatcher !== undefined && !isMatch(found, assertMatcher)) { reportError( new TypeError(`${recordName} was in unexpected state`), { extra: { record: found, assertMatcher } } ) } } return index }
This code causes this error:
ERROR in [at-loader] TS2321: Excessive stack depth comparing types 'Partial<T>' and 'string | [string, any] | ListIterator<T, boolean> | PartialDeep<T> | undefined'. ERROR in [at-loader] ./app/assets/javascripts/utilities/immutable-array.ts:21:34 TS2321: Excessive stack depth comparing types 'Partial<T>' and 'string | [string, any] | ListIterator<T, boolean> | PartialDeep<T> | undefined'.
package versions
@types/lodash@4.14.108
typescript@2.8.1
This is not an issue with @types/lodash@4.14.106
@types/lodash@4.14.106
cc: @aj-r @andy-ms
The text was updated successfully, but these errors were encountered:
@rhys-vdw Thanks, this looks like a duplicate of microsoft/TypeScript#21592.
It looks like it's fixed in your case if you write matcher: _.PartialDeep<T>, instead of matcher: Partial<T>.
matcher: _.PartialDeep<T>,
matcher: Partial<T>
Sorry, something went wrong.
No branches or pull requests
This code causes this error:
package versions
@types/lodash@4.14.108
typescript@2.8.1
This is not an issue with
@types/lodash@4.14.106
cc: @aj-r @andy-ms
The text was updated successfully, but these errors were encountered: