// Code generated by convertFourslash; DO NOT EDIT.
// To modify this test, run "npm run makemanual codeFixMissingTypeAnnotationOnExports34-object-spread"

package fourslash_test

import (
	"testing"

	"github.com/microsoft/typescript-go/internal/fourslash"
	"github.com/microsoft/typescript-go/internal/testutil"
)

func TestCodeFixMissingTypeAnnotationOnExports34_object_spread(t *testing.T) {
	fourslash.SkipIfFailing(t)
	t.Parallel()
	defer testutil.RecoverAndFail(t, "Panic on fourslash test")
	const content = `// @isolatedDeclarations: true
// @declaration: true
// @Filename: /code.ts
const Start = {
  A: 'A',
  B: 'B',
} as const;

const End = {
  Y: "Y",
  Z: "Z"
} as const;
export const All_Part1 = {};
function getPart() {
  return { M: "Z"}
}

export const All = {
  x: 1,
  ...Start,
  y: 1,
  ...getPart(),
  ...End,
  z: 1,
};`
	f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
	defer done()
	f.VerifyCodeFix(t, fourslash.VerifyCodeFixOptions{
		Description: "Add annotation of type 'typeof All_Part1_1 & typeof Start & typeof All_Part3 & typeof All_Part4 & typeof End & typeof All_Part6'",
		NewFileContent: `const Start = {
  A: 'A',
  B: 'B',
} as const;

const End = {
  Y: "Y",
  Z: "Z"
} as const;
export const All_Part1 = {};
function getPart() {
  return { M: "Z"}
}

const All_Part1_1 = {
    x: 1
};
const All_Part3 = {
    y: 1
};
const All_Part4 = getPart();
const All_Part6 = {
    z: 1
};
export const All: typeof All_Part1_1 & typeof Start & typeof All_Part3 & typeof All_Part4 & typeof End & typeof All_Part6 = {
    ...All_Part1_1,
    ...Start,
    ...All_Part3,
    ...All_Part4,
    ...End,
    ...All_Part6
};`,
		Index: 1,
	})
}
