mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
add donna definitions
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
/// <reference path="./donna.d.ts" />
|
||||
|
||||
import donna = require("donna");
|
||||
var metadata = donna.generateMetadata(['/path/to/my-module', '/path/to/another-module']);
|
||||
|
||||
metadata = {
|
||||
"files": {
|
||||
"spec/metadata_templates/classes/class_with_prototype_properties.coffee": {
|
||||
"objects": {
|
||||
"3": {
|
||||
"0": {
|
||||
"type": "class",
|
||||
"name": "TextBuffer",
|
||||
"bindingType": null,
|
||||
"classProperties": [],
|
||||
"prototypeProperties": [
|
||||
[
|
||||
4,
|
||||
9
|
||||
],
|
||||
[
|
||||
11,
|
||||
11
|
||||
]
|
||||
],
|
||||
"doc": " Public: A mutable text container with undo/redo support and the ability to\nannotate logical regions in the text.\n\n ",
|
||||
"range": [
|
||||
[
|
||||
3,
|
||||
0
|
||||
],
|
||||
[
|
||||
11,
|
||||
17
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"4": {
|
||||
"9": {
|
||||
"name": "prop2",
|
||||
"type": "primitive",
|
||||
"range": [
|
||||
[
|
||||
4,
|
||||
9
|
||||
],
|
||||
[
|
||||
4,
|
||||
13
|
||||
]
|
||||
],
|
||||
"bindingType": "prototypeProperty"
|
||||
}
|
||||
},
|
||||
"11": {
|
||||
"11": {
|
||||
"name": "method2",
|
||||
"bindingType": "prototypeProperty",
|
||||
"type": "function",
|
||||
"paramNames": [
|
||||
"a"
|
||||
],
|
||||
"range": [
|
||||
[
|
||||
11,
|
||||
11
|
||||
],
|
||||
[
|
||||
11,
|
||||
16
|
||||
]
|
||||
],
|
||||
"doc": " Public: Takes an argument and does some stuff.\n\na - A {String}\n\nReturns {Boolean}. "
|
||||
}
|
||||
}
|
||||
},
|
||||
"exports": {}
|
||||
}
|
||||
}
|
||||
};
|
||||
Vendored
+34
@@ -0,0 +1,34 @@
|
||||
// Type definitions for donna
|
||||
// Project: https://github.com/atom/donna
|
||||
// Definitions by: vvakame <https://github.com/vvakame/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module "donna" {
|
||||
function generateMetadata(modules: string[]): DonnaTypes.Metadata;
|
||||
}
|
||||
|
||||
declare module DonnaTypes {
|
||||
interface Metadata {
|
||||
files: { [filePath: string]: File; };
|
||||
}
|
||||
|
||||
interface File {
|
||||
objects: { [line: number]: Line; };
|
||||
exports: any;
|
||||
}
|
||||
|
||||
interface Line {
|
||||
[row: number]: Object;
|
||||
}
|
||||
|
||||
interface Object {
|
||||
type: string;
|
||||
name: string;
|
||||
bindingType: string;
|
||||
classProperties?: any[];
|
||||
prototypeProperties?: number[][];
|
||||
doc?: string;
|
||||
range: number[][];
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"version": "1.4.1",
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
"declaration": false,
|
||||
"noImplicitAny": false,
|
||||
"removeComments": true,
|
||||
"noLib": false
|
||||
},
|
||||
"filesGlob": [
|
||||
"./**/*.ts",
|
||||
"!./node_modules/**/*.ts"
|
||||
],
|
||||
"files": [
|
||||
"./donna-tests.ts",
|
||||
"./donna.d.ts"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user