@@ -5,6 +5,10 @@ import { Prop, IPropParent, UNSET } from './prop';
55import { Node } from '../node' ;
66import { TransformStage } from '../transform-stage' ;
77
8+ interface ExtrasObject {
9+ [ key : string ] : any ;
10+ }
11+
812export const EXTRA_KEY_PREFIX = '___' ;
913export function getConvertedExtraKey ( key : string ) : string {
1014 if ( ! key ) {
@@ -53,7 +57,7 @@ export class Props implements IPropParent {
5357
5458 @obx type : 'map' | 'list' = 'map' ;
5559
56- constructor ( owner : Node , value ?: PropsMap | PropsList | null , extras ?: object ) {
60+ constructor ( owner : Node , value ?: PropsMap | PropsList | null , extras ?: ExtrasObject ) {
5761 makeObservable ( this ) ;
5862 this . owner = owner ;
5963 if ( Array . isArray ( value ) ) {
@@ -70,7 +74,7 @@ export class Props implements IPropParent {
7074 }
7175
7276 @action
73- import ( value ?: PropsMap | PropsList | null , extras ?: object ) {
77+ import ( value ?: PropsMap | PropsList | null , extras ?: ExtrasObject ) {
7478 const originItems = this . items ;
7579 if ( Array . isArray ( value ) ) {
7680 this . type = 'list' ;
@@ -104,7 +108,7 @@ export class Props implements IPropParent {
104108 }
105109 }
106110
107- export ( stage : TransformStage = TransformStage . Save ) : { props ?: PropsMap | PropsList ; extras ?: object } {
111+ export ( stage : TransformStage = TransformStage . Save ) : { props ?: PropsMap | PropsList ; extras ?: ExtrasObject } {
108112 stage = compatStage ( stage ) ;
109113 if ( this . items . length < 1 ) {
110114 return { } ;
0 commit comments