delphirtl
Version:
RTL functions from Delphi
28 lines (15 loc) • 762 B
Markdown
[**delphirtl**](../README.md) • **Docs**
***
[delphirtl](../globals.md) / CommonMethodsOrProperties
# Type Alias: CommonMethodsOrProperties\<A, B\>
> **CommonMethodsOrProperties**\<`A`, `B`\>: \{ \[P in keyof A & keyof B\]: A\[P\] \| B\[P\] \}
Declares a type that extracts common properties or methods of two classes.
Usage: "type CommonType = CommonMethodsOrProperties<ClassA, ClassB>;"
To use on multiple classes, nest the definitions: "CommonMethodsOrProperties<ClassA, CommonMethodsOrProperties<ClassB, ClassC>>;"
## Type Parameters
• **A** *extends* `object`
extends {}
• **B** *extends* `object`
extends {}
## Defined in
[src/rtl.ts:13](https://github.com/chuacw/delphirtl/blob/b2d86277a5251f0037cf01044224c3e29dc4c6be/src/rtl.ts#L13)