@robotical/scratch-to-python-transpiler
Version:
Transpile Scratch project files to python code
14 lines (13 loc) • 501 B
JavaScript
;
// General-purpose utility functions for TypeScript
Object.defineProperty(exports, "__esModule", { value: true });
// Gets a property from an object, asserting that the property exists within
// that object. Useful for cases where an undefined property should error,
// since those cases will be caught at compile rather than runtime.
//
// From:
// https://mariusschulz.com/blog/keyof-and-lookup-types-in-typescript
function prop(obj, key) {
return obj[key];
}
exports.prop = prop;