-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Closed
aws/jsii
#273Labels
bugThis issue is a bug.This issue is a bug.
Description
when installing the package @aws-cdk/cdk, there is also a JSX file exported, which contains the type definition:
declare global {
namespace JSX {
/**
* Declare JSX.Element to be the lazy specification of a Construct
*/
interface Element {
type: ConstructConstructor
props: any
children: JSX.Element[]
}
interface ElementAttributesProperty {
jsxProps: any
}
interface IntrinsicAttributes {
id: string
}
}
}this breaks all *.tsx files containing react components, like simple renderToString(<div />). I assume this is because the global namespace declaration above replaces react's types completely. This means I can not use this package in any app that uses both, aws-cdk and react. Is there any workaround to make things work again? In my tsconfig.json there is "jsx": "react" already set with no effect.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.