-
Notifications
You must be signed in to change notification settings - Fork 12.8k
No information for Error: Debug Failure. No error for last overload signature #35186
New issue
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
Comments
It's a crash, so by definition something has broken in an unexpected way 😢 Some code snippet that would reproduce this crash would be extremely helpful - would you be able to share an example? We might be able to deduce what went wrong from staring at the code, but it takes a lot longer |
So we use TS 3.7.2 and are getting this error while using @mangoweb/scripts-base v0.0.12 We hit this error when we try to initialize a class which extends our Component.ts We are able to overcome this error with following ways:
|
@RyanCavanaugh I made a minimal test case for our version of Debug Failure Error: https://github.com/enzy/ts-scriptsbase-debug-failure |
I have another minimal repo for this, with src/test.ts import { Table } from "@apache-arrow/ts"; tsconfig.json {
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"outDir": "./dist/"
}
}
|
I had this with the latest version of TypeScript (currently 4.3.2), but setting the "includes" property in tsconfig.json removed the issue. |
I have encountered this issue in TypeScript 4.4.3, I don't know if further examples are wanted but this minimal repro may be useful since it's standalone (no packages); the error seems to occur no matter the tsconfig options, I tested that it still occurs with no tsconfig at all. interface CollectionDocument<TIdPrefix extends string> {
id: `${TIdPrefix}_${string}`;
}
type CollectionDocumentIdPrefix<TCollectionDocument extends CollectionDocument<string>> =
TCollectionDocument["id"] extends `${infer TIdPrefix}_${string}` ? TIdPrefix : never;
type CollectionSpecs = { [name: string]: CollectionDocument<string>; };
type CollectionSpecNames<TCollectionNames extends string> = TCollectionNames | `History_${TCollectionNames}`;
interface HistoryDocument<TDocument extends CollectionDocument<string>> extends CollectionDocument<`hist_${CollectionDocumentIdPrefix<TDocument>}`> {
document: TDocument | null;
}
type CollectionFromName<
TCollectionSpecs extends CollectionSpecs,
TCollectionName extends CollectionSpecNames<keyof TCollectionSpecs & string>,
> =
TCollectionName extends `History_${infer TOriginalCollectionName}`
? Collection<HistoryDocument<TCollectionSpecs[TOriginalCollectionName]>>
: Collection<TCollectionSpecs[TCollectionName]>;
class Driver<TCollectionSpecs extends CollectionSpecs = CollectionSpecs> {
public getCollection<TCollectionName extends CollectionSpecNames<keyof TCollectionSpecs & string>>(): CollectionFromName<TCollectionSpecs, TCollectionName> {
// This line seems to be the origin of the error, the 'this' argument specifically
return new Collection<CollectionDocument<string>>(this) as any;
}
}
class Collection<TDocument extends CollectionDocument<string>> {
public driver: Driver;
public document: TDocument;
public constructor(driver: Driver) {
this.driver = driver;
}
} |
An other example: versions: import { Collection } from 'mongodb';
import type { OptionalUnlessRequiredId } from 'mongodb';
export type MongoDocument<T> = OptionalUnlessRequiredId<Omit<T, 'id'> & { _id: string }>;
export type MongoDocumentWithPartialId<T> = OptionalUnlessRequiredId<Omit<T, 'id'> & { _id?: string }>;
export declare function toProjectedEntity<T extends Entity>(document: MongoDocumentWithPartialId<T>): any;
export class MongoBaseRepository<T extends Entity> {
readonly collection: Collection<any>;
async loadManyProjectedByFilter(): Promise<any> {
const documents = await this.collection.find<MongoDocument<T>>({}).toArray();
return [documents.map(toProjectedEntity)];
}
} Only happens if |
The point about this issue should be to emit more detailed feedback whenever it happens, so we can troubleshoot it by ourselves. |
Also just happened to me on v5.7.3.
I had a type like this type IVariant = 'success | 'destructive'; And forgot to add
|
TypeScript Version: 3.7.2
Search Terms:
Debug Failure, No error for last overload signature, Typescript 3.7.2, Sonar
Code / Error
Code is not available - executing entity is sonar runner
As well formatted image

or as code...
Expected behavior:
Should give some additional information what the problem is
Actual behavior:
When looking at the error, I have no idea if it's an issue with my application code, with sonar or with typescript itself
The text was updated successfully, but these errors were encountered: