File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed
Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,13 @@ export interface ContextProvider {
33 domain : string ;
44}
55export type ImportantSettingsProvider = {
6- contextProviders : ContextProvider [ ] ;
76 important : object ;
87 setImportant ( key : string , value : unknown ) : void ;
98 importantSettingsProviders : ContextProvider [ ] ;
109 isImportantEdited : boolean | undefined ;
1110} ;
12- export declare function importantSettingsProviderMixin < T extends InMemoryEntity > ( item : T ) : asserts item is T & ImportantSettingsProvider ;
11+ type AbstractBase = {
12+ contextProviders : ContextProvider [ ] ;
13+ } ;
14+ export declare function importantSettingsProviderMixin < T extends InMemoryEntity & AbstractBase > ( item : T ) : asserts item is T & ImportantSettingsProvider ;
15+ export { } ;
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ const clone_1 = require("../../utils/clone");
55function importantSettingsProviderMixin ( item ) {
66 // @ts -expect-error
77 const properties = {
8- contextProviders : [ ] ,
98 get important ( ) {
109 return ( 0 , clone_1 . deepClone ) ( this . _json . important || { } ) ;
1110 } ,
Original file line number Diff line number Diff line change @@ -6,19 +6,21 @@ export interface ContextProvider {
66}
77
88export type ImportantSettingsProvider = {
9- contextProviders : ContextProvider [ ] ;
109 important : object ;
1110 setImportant ( key : string , value : unknown ) : void ;
1211 importantSettingsProviders : ContextProvider [ ] ;
1312 isImportantEdited : boolean | undefined ;
1413} ;
1514
16- export function importantSettingsProviderMixin < T extends InMemoryEntity > (
15+ type AbstractBase = {
16+ contextProviders : ContextProvider [ ] ;
17+ } ;
18+
19+ export function importantSettingsProviderMixin < T extends InMemoryEntity & AbstractBase > (
1720 item : T ,
1821) : asserts item is T & ImportantSettingsProvider {
1922 // @ts -expect-error
20- const properties : InMemoryEntity & ImportantSettingsProvider = {
21- contextProviders : [ ] ,
23+ const properties : InMemoryEntity & AbstractBase & ImportantSettingsProvider = {
2224 get important ( ) {
2325 return deepClone ( this . _json . important || { } ) ;
2426 } ,
You can’t perform that action at this time.
0 commit comments