typeFunctionComponent<P=any>=(props: P)=>Element|null;interfaceElementAttributes{idomKey?: string|null|number;children?: unknown;skip?: boolean;}declarefunctionelement<P>(tag: FunctionComponent<P&ElementAttributes>,attributes: P&ElementAttributes,): Element;declarefunctionElName(props: {name?: string}): Element;element(ElName,{});// Does not compile in 5.6. Should compile.Argument of type '(props: { name?: string | undefined; }) => Element' is not assignable to parameter of type 'FunctionComponent<ElementAttributes>'.
Types of parameters 'props' and 'props' are incompatible.
Type 'ElementAttributes' has no properties in common with type '{ name?: string | undefined; }'.(2345)
🔎 Search Terms
Inference
🕗 Version & Regression Information
⏯ Playground Link
https://www.typescriptlang.org/play/?ts=5.6.1-rc#code/C4TwDgpgBAYgrgOwMbAJYHsEGF0FsyYQLAA8AClALxQCGCIAfFVABRgBO6YAzgFxRkAlFSYBRADYRcRYFAA+UBHHHiA3ACh1qYhHYAzGkmgSpMgILBg7VACM4wCNygBvdVCioAJngDSEEAD8-NxW2gDm8orK4pFKuDa6Gu5IABao4p7sREFQiADWCOgA7ghJUNx5qGA5NujoknQaAL6anhBI4jRZUHqIKBgIUBCS0sTkDCxuUMA0YfzwyGiYOPiEYxQAZFAmo8AWoXYO3AwANFM0ltaHjvyb2yPml7b2jmeC-DsyGuptHV3QvUWA3uADkaNI2JwePxnAhwRAciFrAgwk13vdTMRvsNMcAWBIwdITi40RoAPRkqAAEXQjkU6FkSDwYHS0G0UAArAA6ABsXKgAGUUuhlJ4oEz8KyueogA
💻 Code
🙁 Actual behavior
Last line errors with:
🙂 Expected behavior
Compiles as it did in previous versions
Additional information about the issue
Confirmed that #59709 does not resolve this issue.
(Google note: relevant source location http://shortn/_Ce1E5yV592)