Skip to content

Commit ec6a2aa

Browse files
author
Richard Gunning
committed
further type declaration
1 parent 02341fb commit ec6a2aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libs/react-ng-wrapper/src/lib/react-ng-wrapper.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ export class ReactNgWrapper<T, U = any> extends React.Component<U, { selector: s
2626
private _componentDef: ComponentDef<T>;
2727
private _subscriptions: Subscription[] = [];
2828

29-
constructor(props, private componentFactory: componentType<T>) {
29+
constructor(props: Readonly<U>, private componentFactory: componentType<T>) {
3030
super(props);
3131

32-
this._componentDef = componentFactory[NG_COMPONENT_DEF] || null;
32+
this._componentDef = componentFactory[NG_COMPONENT_DEF] || null;
3333

3434
if (!this._componentDef) {
3535
throw new Error('A component with a ngComponentDef is required');
3636
}
3737

3838
this.state = {
39-
selector: this._componentDef ? this._componentDef.selectors[0][0] as string: '',
39+
selector: this._componentDef ? this._componentDef.selectors[0][0] as string : '',
4040
propChanged: new Set<string>()
4141
};
4242
}

0 commit comments

Comments
 (0)