main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
692 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | import { Modx } from './_Internal';
|
---|
| 2 | import { Key } from '../Any/Key';
|
---|
| 3 | /**
|
---|
| 4 | * Create an object filled with `A` for the fields `K`
|
---|
| 5 | * @param K to choose fields
|
---|
| 6 | * @param A (?=`unknown`) to fill fields with
|
---|
| 7 | * @param modx (?=`['!', 'W']`) to set modifiers
|
---|
| 8 | * @returns [[Object]]
|
---|
| 9 | * @example
|
---|
| 10 | * ```ts
|
---|
| 11 | * ```
|
---|
| 12 | */
|
---|
| 13 | export declare type Record<K extends Key, A extends any = unknown, modx extends Modx = ['!', 'W']> = {
|
---|
| 14 | '!': {
|
---|
| 15 | 'R': {
|
---|
| 16 | readonly [P in K]: A;
|
---|
| 17 | };
|
---|
| 18 | 'W': {
|
---|
| 19 | [P in K]: A;
|
---|
| 20 | };
|
---|
| 21 | };
|
---|
| 22 | '?': {
|
---|
| 23 | 'R': {
|
---|
| 24 | readonly [P in K]?: A;
|
---|
| 25 | };
|
---|
| 26 | 'W': {
|
---|
| 27 | [P in K]?: A;
|
---|
| 28 | };
|
---|
| 29 | };
|
---|
| 30 | }[modx[0]][modx[1]];
|
---|
Note:
See
TracBrowser
for help on using the repository browser.