38320680cb
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>
28 lines
757 B
JavaScript
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() {}; |