2023-02-23 10:55:58 +03:00
|
|
|
|
// @filename: file.tsx
|
2021-01-15 13:30:44 +03:00
|
|
|
|
// @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" />
|