@@ -25,7 +25,7 @@ import { IClassicComm, ICallbacks } from './services-shim';
25
25
26
26
import { JUPYTER_WIDGETS_VERSION } from './version' ;
27
27
28
- import { Dict } from './utils' ;
28
+ import { BufferJSON , Dict } from './utils' ;
29
29
30
30
import { KernelMessage } from '@jupyterlab/services' ;
31
31
@@ -227,7 +227,7 @@ export class WidgetModel extends Backbone.Model {
227
227
case 'echo_update' :
228
228
this . state_change = this . state_change
229
229
. then ( ( ) => {
230
- const state = data . state ;
230
+ const state : Dict < BufferJSON > = data . state ;
231
231
const buffer_paths = data . buffer_paths ?? [ ] ;
232
232
const buffers = msg . buffers ?. slice ( 0 , buffer_paths . length ) ?? [ ] ;
233
233
utils . put_buffers ( state , buffer_paths , buffers ) ;
@@ -651,11 +651,11 @@ export class WidgetModel extends Backbone.Model {
651
651
* deserialization of widget models.
652
652
*/
653
653
static _deserialize_state (
654
- state : JSONObject ,
654
+ state : Dict < BufferJSON > ,
655
655
manager : IWidgetManager
656
- ) : Promise < utils . Dict < unknown > > {
656
+ ) : Promise < utils . Dict < BufferJSON > > {
657
657
const serializers = this . serializers ;
658
- let deserialized : Dict < any > ;
658
+ let deserialized : Dict < PromiseLike < BufferJSON > | BufferJSON > ;
659
659
if ( serializers ) {
660
660
deserialized = { } ;
661
661
for ( const k in state ) {
0 commit comments