File tree Expand file tree Collapse file tree 4 files changed +8
-9
lines changed Expand file tree Collapse file tree 4 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ import { KernelMessage } from '@jupyterlab/services';
34
34
*/
35
35
export function unpack_models (
36
36
value : any | Dict < unknown > | string | ( Dict < unknown > | string ) [ ] ,
37
- manager : IWidgetManager
37
+ manager ? : IWidgetManager // actually required, but typed to be compatible with ISerializers
38
38
) : Promise < WidgetModel | Dict < WidgetModel > | WidgetModel [ ] | any > {
39
39
if ( Array . isArray ( value ) ) {
40
40
const unpacked : any [ ] = [ ] ;
@@ -50,7 +50,7 @@ export function unpack_models(
50
50
return utils . resolvePromisesDict ( unpacked ) ;
51
51
} else if ( typeof value === 'string' && value . slice ( 0 , 10 ) === 'IPY_MODEL_' ) {
52
52
// get_model returns a promise already
53
- return manager . get_model ( value . slice ( 10 , value . length ) ) ;
53
+ return manager ! . get_model ( value . slice ( 10 , value . length ) ) ;
54
54
} else {
55
55
return Promise . resolve ( value ) ;
56
56
}
Original file line number Diff line number Diff line change @@ -389,8 +389,8 @@ export class ControllerView extends DOMWidgetView {
389
389
const dummy = new Widget ( ) ;
390
390
this . button_box . addWidget ( dummy ) ;
391
391
392
- return this . create_child_view ( model )
393
- . then ( ( view : ControllerButtonView ) => {
392
+ return this . create_child_view < ControllerButtonView > ( model )
393
+ . then ( ( view ) => {
394
394
// replace the dummy widget with the new one.
395
395
const i = ArrayExt . firstIndexOf ( this . button_box . widgets , dummy ) ;
396
396
this . button_box . insertWidget ( i , view . luminoWidget ) ;
@@ -406,8 +406,8 @@ export class ControllerView extends DOMWidgetView {
406
406
const dummy = new Widget ( ) ;
407
407
this . axis_box . addWidget ( dummy ) ;
408
408
409
- return this . create_child_view ( model )
410
- . then ( ( view : ControllerAxisView ) => {
409
+ return this . create_child_view < ControllerAxisView > ( model )
410
+ . then ( ( view ) => {
411
411
// replace the dummy widget with the new one.
412
412
const i = ArrayExt . firstIndexOf ( this . axis_box . widgets , dummy ) ;
413
413
this . axis_box . insertWidget ( i , view . luminoWidget ) ;
Original file line number Diff line number Diff line change @@ -317,8 +317,8 @@ export class RadioButtonsView extends DescriptionView {
317
317
update ( options ?: any ) : void {
318
318
const items : string [ ] = this . model . get ( '_options_labels' ) ;
319
319
const radios = Array . from (
320
- this . container . querySelectorAll ( 'input[type="radio"]' )
321
- ) . map ( ( x : HTMLInputElement ) => x . value ) ;
320
+ this . container . querySelectorAll < HTMLInputElement > ( 'input[type="radio"]' )
321
+ ) . map ( ( x ) => x . value ) ;
322
322
let stale = items . length !== radios . length ;
323
323
324
324
if ( ! stale ) {
Original file line number Diff line number Diff line change 18
18
"strict" : true ,
19
19
"noImplicitThis" : false ,
20
20
"strictPropertyInitialization" : false ,
21
- "strictFunctionTypes" : false ,
22
21
"target" : " es2017"
23
22
}
24
23
}
You can’t perform that action at this time.
0 commit comments