Leading comments have trailing separator while trailing comments have leading space This removes the extra trailing space in the trailing comments
53 lines
894 B
TypeScript
53 lines
894 B
TypeScript
//// [generics2NoError.ts]
|
|
interface A { a: string; }
|
|
interface B extends A { b: string; }
|
|
interface C extends B { c: string; }
|
|
interface G<T, U extends B> {
|
|
x: T;
|
|
y: U;
|
|
}
|
|
|
|
|
|
var v1: {
|
|
x: { a: string; }
|
|
y: { a: string; b: string; c: string };
|
|
}; // Ok
|
|
|
|
|
|
var v2: G<{ a: string }, C>; // Ok, equivalent to G<A, C>
|
|
var v4: G<G<A, B>, C>; // Ok
|
|
|
|
//// [generics2NoError.js]
|
|
var v1; // Ok
|
|
var v2; // Ok, equivalent to G<A, C>
|
|
var v4; // Ok
|
|
|
|
|
|
//// [generics2NoError.d.ts]
|
|
interface A {
|
|
a: string;
|
|
}
|
|
interface B extends A {
|
|
b: string;
|
|
}
|
|
interface C extends B {
|
|
c: string;
|
|
}
|
|
interface G<T, U extends B> {
|
|
x: T;
|
|
y: U;
|
|
}
|
|
declare var v1: {
|
|
x: {
|
|
a: string;
|
|
};
|
|
y: {
|
|
a: string;
|
|
b: string;
|
|
c: string;
|
|
};
|
|
};
|
|
declare var v2: G<{
|
|
a: string;
|
|
}, C>;
|
|
declare var v4: G<G<A, B>, C>;
|