mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
27 lines
918 B
Go
27 lines
918 B
Go
// Code generated by convertFourslash; DO NOT EDIT.
|
|
// To modify this test, run "npm run makemanual quickInforForSucessiveInferencesIsNotAny"
|
|
|
|
package fourslash_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/microsoft/typescript-go/internal/fourslash"
|
|
"github.com/microsoft/typescript-go/internal/testutil"
|
|
)
|
|
|
|
func TestQuickInforForSucessiveInferencesIsNotAny(t *testing.T) {
|
|
fourslash.SkipIfFailing(t)
|
|
t.Parallel()
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `declare function schema<T> (value : T) : {field : T};
|
|
|
|
declare const b: boolean;
|
|
const obj/*1*/ = schema(b);
|
|
const actualTypeOfNested/*2*/ = schema(obj);`
|
|
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
|
defer done()
|
|
f.VerifyQuickInfoAt(t, "1", "const obj: {\n field: boolean;\n}", "")
|
|
f.VerifyQuickInfoAt(t, "2", "const actualTypeOfNested: {\n field: {\n field: boolean;\n };\n}", "")
|
|
}
|