mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 02:29:04 +03:00
b887b30092
**Description:** This is required for https://github.com/swc-project/swc/pull/6981 and https://github.com/swc-project/swc/pull/6950
30 lines
594 B
TypeScript
30 lines
594 B
TypeScript
// @filename: file.tsx
|
|
// @jsx: preserve
|
|
// @noLib: true
|
|
// @skipLibCheck: true
|
|
// @libFiles: react.d.ts,lib.d.ts
|
|
|
|
import React = require('react');
|
|
|
|
interface Address {
|
|
street: string;
|
|
country: string;
|
|
}
|
|
|
|
interface CanadianAddress extends Address {
|
|
postalCode: string;
|
|
}
|
|
|
|
interface AmericanAddress extends Address {
|
|
zipCode: string;
|
|
}
|
|
|
|
type Properties = CanadianAddress | AmericanAddress;
|
|
|
|
export class AddressComp extends React.Component<Properties, void> {
|
|
public render() {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
let a = <AddressComp postalCode='T1B 0L3' street="vancouver" country="CA" /> |