generated from lit/lit-element-starter-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
message-box.generator.d.ts
25 lines (25 loc) · 1.37 KB
/
message-box.generator.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { MessageBox } from './message-box';
declare type Equals<TypeA, TypeB, EqualsReturn, NotEqualsReturn> = (<T>() => T extends TypeA ? 1 : 2) extends (<T>() => T extends TypeB ? 1 : 2) ? EqualsReturn : NotEqualsReturn;
declare type WritableKeys<Type> = {
[Key in keyof Type]: Equals<{
[One in Key]: Type[Key];
}, {
-readonly [One in Key]: Type[Key];
}, Key, never>;
}[keyof Type];
declare type PropertiesDict = Partial<Pick<MessageBox, NonNullable<WritableKeys<MessageBox>>>>;
declare type SetPropertyParameters = Parameters<CSSStyleDeclaration["setProperty"]>;
declare type StylesDict = Partial<Record<SetPropertyParameters["0"], SetPropertyParameters["1"]>>;
/**
* For quickly generate a message-box
*
* @param children - children of `<message-box/>`
* @param propertiesDict - properties dictionary for initialize, optional
* @param stylesDict - stylesheet dictionary for initialize, optional
* @param mountPoint - reference to mount point element for computing style, optional
* @param doc - reference to document, optional
* @returns {MessageBox} instance
*/
declare function generator(children: HTMLElement | HTMLElement[] | string, propertiesDict?: PropertiesDict, stylesDict?: StylesDict, mountPoint?: HTMLElement | null, doc?: Document): MessageBox;
export default generator;
//# sourceMappingURL=message-box.generator.d.ts.map