jupyter-js-widgets.d.ts 1.1 KB

12345678910111213141516171819202122232425262728
  1. // Copyright (c) Jupyter Development Team.
  2. // Distributed under the terms of the Modified BSD License.
  3. /// <reference path="../backbone/backbone-global.d.ts" />
  4. declare module "jupyter-js-widgets" {
  5. // We have to use es5-style imports rather than es6-style imports
  6. // since typedoc only supports TS 1.6, and es6-style imports were
  7. // introduced in TS 1.7. See https://github.com/jasongrout/jupyter-js-ui/pull/1.
  8. import services = require('jupyter-js-services');
  9. export class ManagerBase<T> {
  10. display_view(msg: services.IKernelMessage, view: Backbone.View<Backbone.Model>, options: any): T;
  11. handle_comm_open(comm: shims.services.Comm, msg: services.IKernelIOPubCommOpenMessage): Promise<Backbone.Model>;
  12. // how do I say msg is an IKernelMessage from 'jupyter-js-services'?
  13. display_model(msg: services.IKernelMessage, model: Backbone.Model, options: any): Promise<T>;
  14. get_model(id: string): Promise<Backbone.Model>;
  15. }
  16. export namespace shims {
  17. export namespace services {
  18. export class Comm {
  19. constructor(comm: any);
  20. }
  21. }
  22. }
  23. }