mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Fixed express definition and added asciify definitions.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
/// <reference path="./asciify.d.ts" />
|
||||
|
||||
import asciify = require('asciify');
|
||||
|
||||
asciify('Whoa', function(err, result){console.log(result)});
|
||||
asciify('Whoa', '3-d', function(err, result){console.log(result)});
|
||||
asciify('Whoa', {font:'3-d'}, function(err, result){console.log(result)});
|
||||
|
||||
asciify.getFonts(function(err, fonts) { fonts.slice(0); });
|
||||
Vendored
+29
@@ -0,0 +1,29 @@
|
||||
// Type definitions for asciify 1.3.5
|
||||
// Project: https://www.npmjs.org/package/asciify
|
||||
// Definitions by: Alan Norbauer http://alan.norbauer.com
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
interface AsciifyOptions {
|
||||
font?: string;
|
||||
maxWidth?: number;
|
||||
color?: string;
|
||||
}
|
||||
|
||||
interface AsciifyCallback {
|
||||
// err is sometimes a string and sometimes an Error
|
||||
(err: any, asciifiedText: string): void
|
||||
}
|
||||
|
||||
declare module "asciify" {
|
||||
function asciify(text: string, callback: AsciifyCallback): void;
|
||||
function asciify(text: string, options: string, callback: AsciifyCallback): void;
|
||||
function asciify(text: string, options: AsciifyOptions, callback: AsciifyCallback): void;
|
||||
|
||||
module asciify {
|
||||
function getFonts(callback: (err: Error, fonts: string[]) => void): void;
|
||||
}
|
||||
|
||||
export = asciify
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
"--noImplicitAny --module commonjs"
|
||||
Reference in New Issue
Block a user