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';
3434 */
3535export function unpack_models (
3636 value : any | Dict < unknown > | string | ( Dict < unknown > | string ) [ ] ,
37- manager : IWidgetManager
37+ manager ? : IWidgetManager // actually required, but typed to be compatible with ISerializers
3838) : Promise < WidgetModel | Dict < WidgetModel > | WidgetModel [ ] | any > {
3939 if ( Array . isArray ( value ) ) {
4040 const unpacked : any [ ] = [ ] ;
@@ -50,7 +50,7 @@ export function unpack_models(
5050 return utils . resolvePromisesDict ( unpacked ) ;
5151 } else if ( typeof value === 'string' && value . slice ( 0 , 10 ) === 'IPY_MODEL_' ) {
5252 // 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 ) ) ;
5454 } else {
5555 return Promise . resolve ( value ) ;
5656 }
Original file line number Diff line number Diff line change @@ -389,8 +389,8 @@ export class ControllerView extends DOMWidgetView {
389389 const dummy = new Widget ( ) ;
390390 this . button_box . addWidget ( dummy ) ;
391391
392- return this . create_child_view ( model )
393- . then ( ( view : ControllerButtonView ) => {
392+ return this . create_child_view < ControllerButtonView > ( model )
393+ . then ( ( view ) => {
394394 // replace the dummy widget with the new one.
395395 const i = ArrayExt . firstIndexOf ( this . button_box . widgets , dummy ) ;
396396 this . button_box . insertWidget ( i , view . luminoWidget ) ;
@@ -406,8 +406,8 @@ export class ControllerView extends DOMWidgetView {
406406 const dummy = new Widget ( ) ;
407407 this . axis_box . addWidget ( dummy ) ;
408408
409- return this . create_child_view ( model )
410- . then ( ( view : ControllerAxisView ) => {
409+ return this . create_child_view < ControllerAxisView > ( model )
410+ . then ( ( view ) => {
411411 // replace the dummy widget with the new one.
412412 const i = ArrayExt . firstIndexOf ( this . axis_box . widgets , dummy ) ;
413413 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 {
317317 update ( options ?: any ) : void {
318318 const items : string [ ] = this . model . get ( '_options_labels' ) ;
319319 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 ) ;
322322 let stale = items . length !== radios . length ;
323323
324324 if ( ! stale ) {
Original file line number Diff line number Diff line change 1818 "strict" : true ,
1919 "noImplicitThis" : false ,
2020 "strictPropertyInitialization" : false ,
21- "strictFunctionTypes" : false ,
2221 "target" : " es2017"
2322 }
2423}
You can’t perform that action at this time.
0 commit comments