File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -14,14 +14,14 @@ interface DoNotUse<T extends string> {
14
14
15
15
type OmittedInitProps = 'selector' | 'target' | 'readonly' | 'license_key' ;
16
16
17
- export type EditorOptions = Parameters < TinyMCE [ 'init' ] > [ 0 ] ;
17
+ type EditorOptions = Parameters < TinyMCE [ 'init' ] > [ 0 ] ;
18
18
19
19
export type InitOptions = Omit < OmitStringIndexSignature < EditorOptions > , OmittedInitProps > & {
20
20
selector ?: DoNotUse < 'selector prop is handled internally by the component' > ;
21
21
target ?: DoNotUse < 'target prop is handled internally by the component' > ;
22
22
readonly ?: DoNotUse < 'readonly prop is overridden by the component, use the `disabled` prop instead' > ;
23
23
license_key ?: DoNotUse < 'license_key prop is overridden by the integration, use the `licenseKey` prop instead' > ;
24
- } ;
24
+ } & { [ key : string ] : unknown } ;
25
25
26
26
export type Version = `${'4' | '5' | '6' | '7' } ${'' | '-dev' | '-testing' | `.${number } ` | `.${number } .${number } `} `;
27
27
Original file line number Diff line number Diff line change @@ -85,6 +85,28 @@ describe('EditorInitTest', () => {
85
85
}
86
86
} ) ;
87
87
} ) ;
88
+
89
+ it ( 'Assigning other unknown props to the editor is allowed' , async ( ) => {
90
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
91
+ using _ = await render ( {
92
+ init : {
93
+ mergetags_list : [ {
94
+ title : 'Client' ,
95
+ menu : [
96
+ {
97
+ value : 'Client.LastCallDate' ,
98
+ title : 'Call date'
99
+ } ,
100
+ {
101
+ value : 'Client.Name' ,
102
+ title : 'Client name'
103
+ }
104
+ ]
105
+ } ] ,
106
+ something_else : 'value'
107
+ }
108
+ } ) ;
109
+ } ) ;
88
110
} )
89
111
) ;
90
112
} ) ;
You can’t perform that action at this time.
0 commit comments