mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
@@ -0,0 +1,21 @@
|
||||
/// <reference path="node-jsfl-runner.d.ts" />
|
||||
|
||||
import * as jsfl from 'node-jsfl-runner';
|
||||
|
||||
let myJSFL: jsfl.JSFL = {
|
||||
init: (param: string): void => {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
jsfl.createJSFL(myJSFL, 'fileName.jsfl', ['Hello!'], (err: NodeJS.ErrnoException) => {
|
||||
|
||||
});
|
||||
|
||||
jsfl.runJSFL('fileName.jsfl', (err: NodeJS.ErrnoException) => {
|
||||
|
||||
});
|
||||
|
||||
jsfl.deleteJSFL('fileName.jsfl', (err: NodeJS.ErrnoException) => {
|
||||
|
||||
});
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
// Type definitions for node-jsfl-runner
|
||||
// Project: https://www.npmjs.com/package/node-jsfl-runner
|
||||
// Definitions by: Michael Randolph <https://github.com/mrand01>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
declare module "node-jsfl-runner" {
|
||||
interface JSFL {
|
||||
init: (...args: any[]) => void;
|
||||
[index: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a JSFL file from a JSFL object
|
||||
* @param jsfl A valid JSFL object
|
||||
* @param fileName Path to output JSFL file location
|
||||
* @param initParams Parameters to pass to JSFL init function
|
||||
* @param callback Callback
|
||||
*/
|
||||
function createJSFL(jsfl: JSFL, fileName: string, initParams: Array<any>, callback: (err: NodeJS.ErrnoException) => void): void;
|
||||
|
||||
/**
|
||||
* Deletes a JSFL file
|
||||
* @param fileName Path to JSFL file to delete
|
||||
* @param callback Callback
|
||||
*/
|
||||
function deleteJSFL(fileName: string, callback: (err: NodeJS.ErrnoException) => void): void;
|
||||
|
||||
/**
|
||||
* Runs a JSFL file
|
||||
* @param fileName Path to JSFL file to run
|
||||
* @param callback Callback
|
||||
*/
|
||||
function runJSFL(fileName: string, callback: (err: NodeJS.ErrnoException) => void): void;
|
||||
}
|
||||
Reference in New Issue
Block a user