skia2/experimental/tskit/build/externs.js
Kevin Lubick 38320680cb [canvaskit] Proof of Concept for Typescript-build structure
This CL demonstrates the following
 - Interface code written in TS
 - Having support for modular builds (e.g. making Paragraph
   optional)
 - Avoiding monolithic interface files
 - Using eslint to enforce style and avoid errors.
 - Working debug and release build (using example.html)

Many of these files would be generated via a tool (that
has not been written yet).

go/ts-canvaskit

Change-Id: Ibe9a214d5897b09920cef01f6e95302f3cf30d5c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392297
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
2021-04-09 19:01:49 +00:00

28 lines
757 B
JavaScript

// This externs format needs to be a little different due to the fact we don't rename
// Module to CanvasKit in quite the same way.
Module.sayHello = function() {};
Module.publicFunction = function() {};
Module.publicExtension = function() {};
Module.withObject = function() {};
Module._privateFunction = function() {};
Module._privateExtension = function() {};
Module._withObject = function() {};
Module.Something = {
getName: function() {},
prototype: {
setName: function() {},
},
_setName: function() {},
};
Module.CompoundObj = {
alpha: 0,
beta: "",
gamma: 0,
};
// Things provided by Emscripten that we don't want minified.
Module.onRuntimeInitialized = function() {};
Module._malloc = function() {};
Module._free = function() {};