30 lines
797 B
Go
30 lines
797 B
Go
// Code generated by convertFourslash; DO NOT EDIT.
|
|
// To modify this test, run "npm run makemanual codeFixInferFromUsageRestParam2"
|
|
|
|
package fourslash_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/microsoft/typescript-go/internal/fourslash"
|
|
"github.com/microsoft/typescript-go/internal/testutil"
|
|
)
|
|
|
|
func TestCodeFixInferFromUsageRestParam2(t *testing.T) {
|
|
fourslash.SkipIfFailing(t)
|
|
t.Parallel()
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `// @strict: false
|
|
// @noImplicitAny: true
|
|
function f(a: number, [|...rest |]){
|
|
a; rest;
|
|
}
|
|
f(1);
|
|
f(2, "s1");
|
|
f(3, false, "s2");
|
|
f(4, "s1", "s2", false, "s4");`
|
|
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
|
defer done()
|
|
f.VerifyRangeAfterCodeFix(t, `...rest: (string | boolean)[]`, false, 0, 0)
|
|
}
|