mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
17 lines
316 B
TypeScript
17 lines
316 B
TypeScript
//// [tests/cases/compiler/genericConstraintSatisfaction1.ts] ////
|
|
|
|
//// [genericConstraintSatisfaction1.ts]
|
|
interface I<S> {
|
|
f: <T extends S>(x: T) => void
|
|
}
|
|
|
|
var x: I<{s: string}>
|
|
declare var x: I<{s: string}>
|
|
x.f({s: 1})
|
|
|
|
|
|
//// [genericConstraintSatisfaction1.js]
|
|
"use strict";
|
|
var x;
|
|
x.f({ s: 1 });
|