mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
JS declaration emit uses this for method returns (#54062)
This commit is contained in:
parent
bbb9f2ebcf
commit
632ad0b0de
@ -9123,7 +9123,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
context.enclosingDeclaration = originalDecl || oldEnclosing;
|
||||
const localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol);
|
||||
const typeParamDecls = map(localParams, p => typeParameterToDeclaration(p, context));
|
||||
const classType = getDeclaredTypeOfClassOrInterface(symbol);
|
||||
const classType = getTypeWithThisArgument(getDeclaredTypeOfClassOrInterface(symbol)) as InterfaceType;
|
||||
const baseTypes = getBaseTypes(classType);
|
||||
const originalImplements = originalDecl && getEffectiveImplementsTypeNodes(originalDecl);
|
||||
const implementsExpressions = originalImplements && sanitizeJSDocImplements(originalImplements)
|
||||
|
||||
@ -102,5 +102,5 @@ declare class Example<T> {
|
||||
getTypeName(this: Example<number>): 'number';
|
||||
getTypeName(this: Example<string>): 'string';
|
||||
transform<U>(fn: (y: T) => U): U;
|
||||
transform<U_1>(): T;
|
||||
transform<U>(): T;
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ export class Element {
|
||||
* @returns {String}
|
||||
*/
|
||||
get textContent(): string;
|
||||
cloneNode(): Element;
|
||||
cloneNode(): this;
|
||||
}
|
||||
export class HTMLElement extends Element {
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user