mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-26 12:10:44 +08:00
Add some tests to sandboxed-module
This commit is contained in:
1 parent
4f03ef7344
commit
96a1146cda
1 file changed
+28
@@ -0,0 +1,28 @@
|
||||
// Type definitions for sandboxed-module v2.0.3
|
||||
// Project: https://github.com/felixge/node-sandboxed-module
|
||||
// Definitions by: Sven Reglitzki <https://github.com/svi3c/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="sandboxed-module.d.ts" />
|
||||
|
||||
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
|
||||
});
|
||||
Reference in new issue
Block a user