diff --git a/sandboxed-module/sandboxed-module-tests.ts b/sandboxed-module/sandboxed-module-tests.ts new file mode 100644 index 000000000..a2e6ff2c4 --- /dev/null +++ b/sandboxed-module/sandboxed-module-tests.ts @@ -0,0 +1,28 @@ +// Type definitions for sandboxed-module v2.0.3 +// Project: https://github.com/felixge/node-sandboxed-module +// Definitions by: Sven Reglitzki +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +import SandboxedModule = require("sandboxed-module"); + +var sandboxedModule:SandboxedModule = SandboxedModule.load("foo"); +var sandboxedModuleExports:any = SandboxedModule.require("foo"); + +var sandboxedModuleExportsWithOptions:any = SandboxedModule.require("foo", { + requires: { + someDep: {} + }, + globals: { + theAnswer: 42 + }, + locals: { + someLocal: 1 + }, + sourceTransformers: { + identity: (src:string) => src + }, + singleOnly: true, + sourceTransformersSingleOnly: true +});