@elliemae/ds-props-helpers 2.3.0-alpha.8 → 2.3.0-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/types/defaultProps/index.d.ts +1 -0
  2. package/dist/types/defaultProps/useMemoMergePropsWithDefault.d.ts +1 -0
  3. package/dist/types/getProps/index.d.ts +2 -0
  4. package/dist/types/globalProps/constants.d.ts +3 -0
  5. package/dist/types/globalProps/globalAttributesPropTypes.d.ts +363 -0
  6. package/dist/types/globalProps/index.d.ts +2 -0
  7. package/dist/types/globalProps/useGetGlobalAttributes.d.ts +5 -0
  8. package/dist/types/index.d.ts +5 -0
  9. package/dist/types/propTypes/PropTypes.d.ts +3 -0
  10. package/dist/types/propTypes/customPropTypes.d.ts +2 -0
  11. package/dist/types/propTypes/describe.d.ts +3 -0
  12. package/dist/types/propTypes/describeConversions.d.ts +3 -0
  13. package/dist/types/propTypes/describeGuards.d.ts +9 -0
  14. package/dist/types/propTypes/index.d.ts +3 -0
  15. package/dist/types/propTypes/toTypescript.d.ts +3 -0
  16. package/dist/types/propTypes/types.d.ts +96 -0
  17. package/dist/types/tests/globalProps/TestComponent.d.ts +1 -0
  18. package/dist/types/tests/globalProps/globalAttributes.test.d.ts +1 -0
  19. package/dist/types/tests/validation/any.validation.test.d.ts +1 -0
  20. package/dist/types/tests/validation/array.validation.test.d.ts +1 -0
  21. package/dist/types/tests/validation/boolean.validation.test.d.ts +1 -0
  22. package/dist/types/tests/validation/function.validation.test.d.ts +1 -0
  23. package/dist/types/tests/validation/number.validation.test.d.ts +1 -0
  24. package/dist/types/tests/validation/object.validation.test.d.ts +1 -0
  25. package/dist/types/tests/validation/schema.validation.test.d.ts +1 -0
  26. package/dist/types/tests/validation/string.validation.test.d.ts +1 -0
  27. package/dist/types/tests/validation/test.schema.d.ts +1 -0
  28. package/dist/types/tests/validation/union.validation.test.d.ts +1 -0
  29. package/dist/types/validation/errorTemplates.d.ts +2 -0
  30. package/dist/types/validation/index.d.ts +3 -0
  31. package/dist/types/validation/typescriptGuards.d.ts +12 -0
  32. package/dist/types/validation/typescriptParsers.d.ts +1 -0
  33. package/dist/types/validation/typescriptValidator.d.ts +15 -0
  34. package/dist/types/validation/validator.d.ts +1 -0
  35. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ export * from './useMemoMergePropsWithDefault';
@@ -0,0 +1 @@
1
+ export declare const useMemoMergePropsWithDefault: <T = Record<string, any>>(props: Partial<T>, defaultProps: Partial<T>, compare?: (a: any, b: any) => boolean) => T;
@@ -0,0 +1,2 @@
1
+ export declare const getAriaProps: (props: Record<string, unknown>) => Record<string, unknown>;
2
+ export declare const getDataProps: (props: Record<string, unknown>) => Record<string, unknown>;
@@ -0,0 +1,3 @@
1
+ import { AriaAttributes, DOMAttributes, HTMLAttributes } from 'react';
2
+ export declare type GlobalAttributes<T = true> = Record<keyof (AriaAttributes & DOMAttributes<Element> & HTMLAttributes<Element>), T>;
3
+ export declare const globalAttributes: GlobalAttributes<true>;
@@ -0,0 +1,363 @@
1
+ export declare const globalAttributesPropTypes: {
2
+ 'aria-*': any;
3
+ 'on-*': any;
4
+ 'data-*': any;
5
+ 'all HTML attributes': any;
6
+ about: any;
7
+ accept: any;
8
+ acceptCharset: any;
9
+ accessKey: any;
10
+ action: any;
11
+ allowFullScreen: any;
12
+ allowTransparency: any;
13
+ alt: any;
14
+ 'aria-activedescendant': any;
15
+ 'aria-atomic': any;
16
+ 'aria-autocomplete': any;
17
+ 'aria-busy': any;
18
+ 'aria-checked': any;
19
+ 'aria-colcount': any;
20
+ 'aria-colindex': any;
21
+ 'aria-colspan': any;
22
+ 'aria-controls': any;
23
+ 'aria-current': any;
24
+ 'aria-describedby': any;
25
+ 'aria-details': any;
26
+ 'aria-disabled': any;
27
+ 'aria-dropeffect': any;
28
+ 'aria-errormessage': any;
29
+ 'aria-expanded': any;
30
+ 'aria-flowto': any;
31
+ 'aria-grabbed': any;
32
+ 'aria-haspopup': any;
33
+ 'aria-hidden': any;
34
+ 'aria-invalid': any;
35
+ 'aria-keyshortcuts': any;
36
+ 'aria-label': any;
37
+ 'aria-labelledby': any;
38
+ 'aria-level': any;
39
+ 'aria-live': any;
40
+ 'aria-modal': any;
41
+ 'aria-multiline': any;
42
+ 'aria-multiselectable': any;
43
+ 'aria-orientation': any;
44
+ 'aria-owns': any;
45
+ 'aria-placeholder': any;
46
+ 'aria-posinset': any;
47
+ 'aria-pressed': any;
48
+ 'aria-readonly': any;
49
+ 'aria-relevant': any;
50
+ 'aria-required': any;
51
+ 'aria-roledescription': any;
52
+ 'aria-rowcount': any;
53
+ 'aria-rowindex': any;
54
+ 'aria-rowspan': any;
55
+ 'aria-selected': any;
56
+ 'aria-setsize': any;
57
+ 'aria-sort': any;
58
+ 'aria-valuemax': any;
59
+ 'aria-valuemin': any;
60
+ 'aria-valuenow': any;
61
+ 'aria-valuetext': any;
62
+ as: any;
63
+ async: any;
64
+ autoCapitalize: any;
65
+ autoComplete: any;
66
+ autoCorrect: any;
67
+ autoFocus: any;
68
+ autoPlay: any;
69
+ autoSave: any;
70
+ capture: any;
71
+ cellPadding: any;
72
+ cellSpacing: any;
73
+ challenge: any;
74
+ charSet: any;
75
+ checked: any;
76
+ cite: any;
77
+ classID: any;
78
+ className: any;
79
+ color: any;
80
+ cols: any;
81
+ colSpan: any;
82
+ content: any;
83
+ contentEditable: any;
84
+ contextMenu: any;
85
+ controls: any;
86
+ coords: any;
87
+ crossOrigin: any;
88
+ data: any;
89
+ datatype: any;
90
+ dateTime: any;
91
+ default: any;
92
+ defaultChecked: any;
93
+ defaultValue: any;
94
+ defer: any;
95
+ dir: any;
96
+ disabled: any;
97
+ download: any;
98
+ draggable: any;
99
+ encType: any;
100
+ form: any;
101
+ formAction: any;
102
+ formEncType: any;
103
+ formMethod: any;
104
+ formNoValidate: any;
105
+ formTarget: any;
106
+ frameBorder: any;
107
+ headers: any;
108
+ height: any;
109
+ hidden: any;
110
+ high: any;
111
+ href: any;
112
+ hrefLang: any;
113
+ htmlFor: any;
114
+ httpEquiv: any;
115
+ id: any;
116
+ inlist: any;
117
+ inputMode: any;
118
+ integrity: any;
119
+ is: any;
120
+ itemID: any;
121
+ itemProp: any;
122
+ itemRef: any;
123
+ itemScope: any;
124
+ itemType: any;
125
+ keyParams: any;
126
+ keyType: any;
127
+ kind: any;
128
+ label: any;
129
+ lang: any;
130
+ list: any;
131
+ loop: any;
132
+ low: any;
133
+ manifest: any;
134
+ marginHeight: any;
135
+ marginWidth: any;
136
+ max: any;
137
+ maxLength: any;
138
+ media: any;
139
+ mediaGroup: any;
140
+ method: any;
141
+ min: any;
142
+ minLength: any;
143
+ multiple: any;
144
+ muted: any;
145
+ name: any;
146
+ nonce: any;
147
+ noValidate: any;
148
+ onAbort: any;
149
+ onAbortCapture: any;
150
+ onAnimationEnd: any;
151
+ onAnimationEndCapture: any;
152
+ onAnimationIteration: any;
153
+ onAnimationIterationCapture: any;
154
+ onAnimationStart: any;
155
+ onAnimationStartCapture: any;
156
+ onAuxClick: any;
157
+ onAuxClickCapture: any;
158
+ onBeforeInput: any;
159
+ onBeforeInputCapture: any;
160
+ onBlur: any;
161
+ onBlurCapture: any;
162
+ onCanPlay: any;
163
+ onCanPlayCapture: any;
164
+ onCanPlayThrough: any;
165
+ onCanPlayThroughCapture: any;
166
+ onChange: any;
167
+ onChangeCapture: any;
168
+ onClick: any;
169
+ onClickCapture: any;
170
+ onCompositionEnd: any;
171
+ onCompositionEndCapture: any;
172
+ onCompositionStart: any;
173
+ onCompositionStartCapture: any;
174
+ onCompositionUpdate: any;
175
+ onCompositionUpdateCapture: any;
176
+ onContextMenu: any;
177
+ onContextMenuCapture: any;
178
+ onCopy: any;
179
+ onCopyCapture: any;
180
+ onCut: any;
181
+ onCutCapture: any;
182
+ onDoubleClick: any;
183
+ onDoubleClickCapture: any;
184
+ onDrag: any;
185
+ onDragCapture: any;
186
+ onDragEnd: any;
187
+ onDragEndCapture: any;
188
+ onDragEnter: any;
189
+ onDragEnterCapture: any;
190
+ onDragExit: any;
191
+ onDragExitCapture: any;
192
+ onDragLeave: any;
193
+ onDragLeaveCapture: any;
194
+ onDragOver: any;
195
+ onDragOverCapture: any;
196
+ onDragStart: any;
197
+ onDragStartCapture: any;
198
+ onDrop: any;
199
+ onDropCapture: any;
200
+ onDurationChange: any;
201
+ onDurationChangeCapture: any;
202
+ onEmptied: any;
203
+ onEmptiedCapture: any;
204
+ onEncrypted: any;
205
+ onEncryptedCapture: any;
206
+ onEnded: any;
207
+ onEndedCapture: any;
208
+ onError: any;
209
+ onErrorCapture: any;
210
+ onFocus: any;
211
+ onFocusCapture: any;
212
+ onGotPointerCapture: any;
213
+ onGotPointerCaptureCapture: any;
214
+ onInput: any;
215
+ onInputCapture: any;
216
+ onInvalid: any;
217
+ onInvalidCapture: any;
218
+ onKeyDown: any;
219
+ onKeyDownCapture: any;
220
+ onKeyPress: any;
221
+ onKeyPressCapture: any;
222
+ onKeyUp: any;
223
+ onKeyUpCapture: any;
224
+ onLoad: any;
225
+ onLoadCapture: any;
226
+ onLoadedData: any;
227
+ onLoadedDataCapture: any;
228
+ onLoadedMetadata: any;
229
+ onLoadedMetadataCapture: any;
230
+ onLoadStart: any;
231
+ onLoadStartCapture: any;
232
+ onLostPointerCapture: any;
233
+ onLostPointerCaptureCapture: any;
234
+ onMouseDown: any;
235
+ onMouseDownCapture: any;
236
+ onMouseEnter: any;
237
+ onMouseLeave: any;
238
+ onMouseMove: any;
239
+ onMouseMoveCapture: any;
240
+ onMouseOut: any;
241
+ onMouseOutCapture: any;
242
+ onMouseOver: any;
243
+ onMouseOverCapture: any;
244
+ onMouseUp: any;
245
+ onMouseUpCapture: any;
246
+ onPaste: any;
247
+ onPasteCapture: any;
248
+ onPause: any;
249
+ onPauseCapture: any;
250
+ onPlay: any;
251
+ onPlayCapture: any;
252
+ onPlaying: any;
253
+ onPlayingCapture: any;
254
+ onPointerCancel: any;
255
+ onPointerCancelCapture: any;
256
+ onPointerDown: any;
257
+ onPointerDownCapture: any;
258
+ onPointerEnter: any;
259
+ onPointerEnterCapture: any;
260
+ onPointerLeave: any;
261
+ onPointerLeaveCapture: any;
262
+ onPointerMove: any;
263
+ onPointerMoveCapture: any;
264
+ onPointerOut: any;
265
+ onPointerOutCapture: any;
266
+ onPointerOver: any;
267
+ onPointerOverCapture: any;
268
+ onPointerUp: any;
269
+ onPointerUpCapture: any;
270
+ onProgress: any;
271
+ onProgressCapture: any;
272
+ onRateChange: any;
273
+ onRateChangeCapture: any;
274
+ onReset: any;
275
+ onResetCapture: any;
276
+ onScroll: any;
277
+ onScrollCapture: any;
278
+ onSeeked: any;
279
+ onSeekedCapture: any;
280
+ onSeeking: any;
281
+ onSeekingCapture: any;
282
+ onSelect: any;
283
+ onSelectCapture: any;
284
+ onStalled: any;
285
+ onStalledCapture: any;
286
+ onSubmit: any;
287
+ onSubmitCapture: any;
288
+ onSuspend: any;
289
+ onSuspendCapture: any;
290
+ onTimeUpdate: any;
291
+ onTimeUpdateCapture: any;
292
+ onTouchCancel: any;
293
+ onTouchCancelCapture: any;
294
+ onTouchEnd: any;
295
+ onTouchEndCapture: any;
296
+ onTouchMove: any;
297
+ onTouchMoveCapture: any;
298
+ onTouchStart: any;
299
+ onTouchStartCapture: any;
300
+ onTransitionEnd: any;
301
+ onTransitionEndCapture: any;
302
+ onVolumeChange: any;
303
+ onVolumeChangeCapture: any;
304
+ onWaiting: any;
305
+ onWaitingCapture: any;
306
+ onWheel: any;
307
+ onWheelCapture: any;
308
+ open: any;
309
+ optimum: any;
310
+ pattern: any;
311
+ placeholder: any;
312
+ playsInline: any;
313
+ poster: any;
314
+ prefix: any;
315
+ preload: any;
316
+ property: any;
317
+ radioGroup: any;
318
+ readOnly: any;
319
+ rel: any;
320
+ required: any;
321
+ resource: any;
322
+ results: any;
323
+ reversed: any;
324
+ role: any;
325
+ rows: any;
326
+ rowSpan: any;
327
+ sandbox: any;
328
+ scope: any;
329
+ scoped: any;
330
+ scrolling: any;
331
+ seamless: any;
332
+ security: any;
333
+ selected: any;
334
+ shape: any;
335
+ size: any;
336
+ sizes: any;
337
+ slot: any;
338
+ span: any;
339
+ spellCheck: any;
340
+ src: any;
341
+ srcDoc: any;
342
+ srcLang: any;
343
+ srcSet: any;
344
+ start: any;
345
+ step: any;
346
+ style: any;
347
+ summary: any;
348
+ suppressContentEditableWarning: any;
349
+ suppressHydrationWarning: any;
350
+ tabIndex: any;
351
+ target: any;
352
+ title: any;
353
+ translate: any;
354
+ type: any;
355
+ typeof: any;
356
+ unselectable: any;
357
+ useMap: any;
358
+ value: any;
359
+ vocab: any;
360
+ width: any;
361
+ wmode: any;
362
+ wrap: any;
363
+ };
@@ -0,0 +1,2 @@
1
+ export * from './useGetGlobalAttributes';
2
+ export * from './globalAttributesPropTypes';
@@ -0,0 +1,5 @@
1
+ import { AriaAttributes, DOMAttributes, HTMLAttributes } from 'react';
2
+ import { GlobalAttributes } from './constants';
3
+ declare type PropsWithAttributes<T extends Record<string, unknown>> = T & AriaAttributes & DOMAttributes<Element> & HTMLAttributes<Element>;
4
+ export declare const useGetGlobalAttributes: <T extends Record<string, unknown>>(props: PropsWithAttributes<T>, overrides: GlobalAttributes<(...args: unknown[]) => unknown>) => AriaAttributes & DOMAttributes<Element> & HTMLAttributes<Element>;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ export * from './defaultProps';
2
+ export * from './validation';
3
+ export * from './getProps';
4
+ export * from './globalProps';
5
+ export * from './propTypes';
@@ -0,0 +1,3 @@
1
+ import { PropTypesObj } from './types';
2
+ declare const PropTypes: PropTypesObj;
3
+ export default PropTypes;
@@ -0,0 +1,2 @@
1
+ import { Validator } from 'prop-types';
2
+ export declare const tupleValidator: (tupleShape: Validator<unknown>[]) => Validator<unknown>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { DocumentedReactComponent } from './types';
3
+ export default function describe<C>(ComponentInstance: React.ComponentType<C>): DocumentedReactComponent<C>;
@@ -0,0 +1,3 @@
1
+ import { Requireable } from 'prop-types';
2
+ import { ReactDescT } from './types';
3
+ export declare const convertPropType: (propType: ReactDescT) => Requireable<unknown>;
@@ -0,0 +1,9 @@
1
+ import { AllPropTypes, ParametizedPropTypes, ReactDescT } from './types';
2
+ export declare const hasArguments: (propType: ReactDescT, realPropType: AllPropTypes) => realPropType is ParametizedPropTypes;
3
+ export declare const isOneOfType: (propType: ReactDescT, realPropType: AllPropTypes) => realPropType is typeof import("prop-types").oneOfType;
4
+ export declare const isArrayOf: (propType: ReactDescT, realPropType: AllPropTypes) => realPropType is typeof import("prop-types").arrayOf;
5
+ export declare const isShape: (propType: ReactDescT, realPropType: AllPropTypes) => realPropType is typeof import("prop-types").shape;
6
+ export declare const isInstanceOf: (propType: ReactDescT, realPropType: AllPropTypes) => realPropType is typeof import("prop-types").instanceOf;
7
+ export declare const isOneOf: (propType: ReactDescT, realPropType: AllPropTypes) => realPropType is typeof import("prop-types").oneOf;
8
+ export declare const isObjectOf: (propType: ReactDescT, realPropType: AllPropTypes) => realPropType is typeof import("prop-types").objectOf;
9
+ export declare const isExact: (propType: ReactDescT, realPropType: AllPropTypes) => realPropType is typeof import("prop-types").exact;
@@ -0,0 +1,3 @@
1
+ import PropTypes from './PropTypes';
2
+ import describe from './describe';
3
+ export { describe, PropTypes };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { ComponentDocumentation, TypescriptDocumentation } from './types';
3
+ export default function descToTypescript<C>(component: React.ComponentType<C>, reactDesc: ComponentDocumentation): TypescriptDocumentation;
@@ -0,0 +1,96 @@
1
+ import { any, array, bool, func, number, object, string, node, element, symbol, elementType, instanceOf, oneOf, oneOfType, arrayOf, objectOf, shape, exact, ValidationMap } from 'prop-types';
2
+ import React from 'react';
3
+ export interface ReactDescObjT {
4
+ [key: string]: unknown;
5
+ required?: boolean;
6
+ deprecated?: Record<string, string>;
7
+ description?: string;
8
+ defaultValue?: unknown;
9
+ format?: string;
10
+ warned?: boolean;
11
+ }
12
+ export declare type InstanceOfT = typeof instanceOf;
13
+ export declare type OneOfT = typeof oneOf;
14
+ export declare type ObjectOfT = typeof objectOf;
15
+ export declare type ExactT = typeof exact;
16
+ export declare type OneOfTypeT = typeof oneOfType;
17
+ export declare type ArrayOfT = typeof arrayOf;
18
+ export declare type ShapeT = typeof shape;
19
+ export declare type AnyT = typeof any;
20
+ export declare type ArrayT = typeof array;
21
+ export declare type BoolT = typeof bool;
22
+ export declare type FuncT = typeof func;
23
+ export declare type NumberT = typeof number;
24
+ export declare type ObjectT = typeof object;
25
+ export declare type StringT = typeof string;
26
+ export declare type NodeT = typeof node;
27
+ export declare type ElementT = typeof element;
28
+ export declare type SymbolT = typeof symbol;
29
+ export declare type ElementTypeT = typeof elementType;
30
+ export declare type ParametizedPropTypes = InstanceOfT | OneOfT | ObjectOfT | ExactT | OneOfTypeT | ArrayOfT | ShapeT;
31
+ export declare type AllPropTypes = AnyT | ArrayT | BoolT | FuncT | NumberT | ObjectT | StringT | NodeT | ElementT | SymbolT | ElementTypeT | ParametizedPropTypes;
32
+ export declare type PropTypesTypes = 'any' | 'array' | 'bool' | 'func' | 'number' | 'object' | 'string' | 'node' | 'element' | 'symbol' | 'elementType' | 'instanceOf' | 'oneOf' | 'oneOfType' | 'arrayOf' | 'objectOf' | 'shape' | 'exact' | 'tuple';
33
+ export interface ReactDescT {
34
+ [key: string]: unknown;
35
+ type: PropTypesTypes;
36
+ defaultValue: (this: ReactDescT, dfault: unknown) => ReactDescT;
37
+ deprecated: (this: ReactDescT, info: Record<string, string>) => ReactDescT;
38
+ description: (this: ReactDescT, descr: string) => ReactDescT;
39
+ format: (this: ReactDescT, format: string) => ReactDescT;
40
+ isRequired: ReactDescT;
41
+ reactDesc: ReactDescObjT;
42
+ args?: ReactDescT | ReactDescT[] | Record<string, ReactDescT> | unknown[] | Parameters<InstanceOfT>[0] | Parameters<OneOfT>[0] | Parameters<ObjectOfT>[0] | Parameters<ExactT>[0];
43
+ }
44
+ export interface ComponentDocumentation {
45
+ propTypes: Record<string, ReactDescT>;
46
+ availableAt?: unknown;
47
+ description?: unknown;
48
+ details?: unknown;
49
+ deprecated?: unknown;
50
+ usage?: unknown;
51
+ intrinsicElement?: unknown;
52
+ toTypescript?: unknown;
53
+ }
54
+ export interface TypescriptDocumentation extends Partial<ComponentDocumentation> {
55
+ name: string;
56
+ properties?: {
57
+ name: string;
58
+ required?: boolean | undefined;
59
+ deprecated?: Record<string, string> | undefined;
60
+ description?: string | undefined;
61
+ format?: string | undefined;
62
+ warned?: boolean | undefined;
63
+ }[];
64
+ }
65
+ export declare type DocumentedReactComponent<T> = React.ComponentType<T> & {
66
+ availableAt: unknown;
67
+ description: unknown;
68
+ details: unknown;
69
+ deprecated: unknown;
70
+ usage: unknown;
71
+ intrinsicElement: unknown;
72
+ toTypescript: unknown;
73
+ propTypesValue: ValidationMap<Record<string, unknown>>;
74
+ };
75
+ export declare type DocumentedPropType = ReactDescT;
76
+ export declare type PropTypesObj = {
77
+ any: DocumentedPropType;
78
+ array: DocumentedPropType;
79
+ bool: DocumentedPropType;
80
+ func: DocumentedPropType;
81
+ number: DocumentedPropType;
82
+ object: DocumentedPropType;
83
+ string: DocumentedPropType;
84
+ node: DocumentedPropType;
85
+ element: DocumentedPropType;
86
+ symbol: DocumentedPropType;
87
+ elementType: DocumentedPropType;
88
+ instanceOf: (cls: unknown) => DocumentedPropType;
89
+ oneOf: (arr: unknown[]) => DocumentedPropType;
90
+ oneOfType: (arr: DocumentedPropType[]) => DocumentedPropType;
91
+ arrayOf: (smth: DocumentedPropType) => DocumentedPropType;
92
+ objectOf: (smth: DocumentedPropType) => DocumentedPropType;
93
+ shape: (obj: Record<string, DocumentedPropType>) => DocumentedPropType;
94
+ exact: (obj: Record<string, DocumentedPropType>) => DocumentedPropType;
95
+ tuple: (arr: DocumentedPropType[]) => DocumentedPropType;
96
+ };
@@ -0,0 +1 @@
1
+ export function TestComponent(props: any): JSX.Element;
@@ -0,0 +1 @@
1
+ export const TypescriptSchema: any;
@@ -0,0 +1,2 @@
1
+ export declare const throwTypeError: (componentName: string, validPropKey: string, invalidProp: unknown, validFormat: string) => void;
2
+ export declare const throwRequiredError: (componentName: string, validPropKey: string) => void;
@@ -0,0 +1,3 @@
1
+ export * from './validator';
2
+ export * from './errorTemplates';
3
+ export * from './typescriptValidator';
@@ -0,0 +1,12 @@
1
+ declare type GuardFn = (format: string) => boolean;
2
+ export declare const isPrimitiveType: GuardFn;
3
+ export declare const isUndefined: GuardFn;
4
+ export declare const isNull: GuardFn;
5
+ export declare const isUnion: GuardFn;
6
+ export declare const isString: GuardFn;
7
+ export declare const isArray: GuardFn;
8
+ export declare const isObject: GuardFn;
9
+ export declare const isFunction: GuardFn;
10
+ export declare const isJSXorNode: GuardFn;
11
+ export declare const isSomethingWithParenthesis: GuardFn;
12
+ export {};
@@ -0,0 +1 @@
1
+ export declare const typescriptObjectParser: (format: string) => [string, string][];
@@ -0,0 +1,15 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ interface TypescriptSchema {
3
+ description: string;
4
+ name: string;
5
+ properties: {
6
+ name: string;
7
+ description: string;
8
+ defaultValue?: unknown;
9
+ format: string;
10
+ required?: boolean;
11
+ }[];
12
+ }
13
+ export declare const validateTypescriptPropTypesImplementation: (props: PropsWithChildren<Record<string, unknown>>, schema: TypescriptSchema, validationsMemo?: Record<string, string>, nextValidationsMemo?: Record<string, string>) => void;
14
+ export declare const useValidateTypescriptPropTypes: <T = Record<string, any>>(props: React.PropsWithChildren<T>, propTypes: any) => void;
15
+ export {};
@@ -0,0 +1 @@
1
+ export declare const useValidatePropTypes: (props: Record<string, unknown>, schema: any) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-props-helpers",
3
- "version": "2.3.0-alpha.8",
3
+ "version": "2.3.0-alpha.9",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Props Helpers",
6
6
  "files": [