36 lines
980 B
Go
36 lines
980 B
Go
// Code generated by convertFourslash; DO NOT EDIT.
|
|
// To modify this test, run "npm run makemanual fixExactOptionalUnassignableProperties3"
|
|
|
|
package fourslash_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/microsoft/typescript-go/internal/fourslash"
|
|
"github.com/microsoft/typescript-go/internal/testutil"
|
|
)
|
|
|
|
func TestFixExactOptionalUnassignableProperties3(t *testing.T) {
|
|
fourslash.SkipIfFailing(t)
|
|
t.Parallel()
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `// @strictNullChecks: true
|
|
// @exactOptionalPropertyTypes: true
|
|
// @Filename: fixExactOptionalUnassignableProperties2.ts
|
|
import { INodeModules } from 'foo'
|
|
interface J {
|
|
a?: number | undefined
|
|
}
|
|
declare var inm: INodeModules
|
|
declare var j: J
|
|
inm/**/ = j
|
|
console.log(inm)
|
|
// @Filename: node_modules/@types/foo/index.d.ts
|
|
export interface INodeModules {
|
|
a?: number
|
|
}`
|
|
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
|
defer done()
|
|
f.VerifyCodeFixNotAvailable(t)
|
|
}
|