-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix expected output to contain comments
- Loading branch information
Showing
7 changed files
with
282 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
/** | ||
* Enum for tri-state values. | ||
* @readonly | ||
* @enum {number} | ||
*/ | ||
declare enum triState { | ||
TRUE, | ||
FALSE, | ||
MAYBE | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,35 @@ | ||
/** | ||
* | ||
* @param {number} [a=10] | ||
* @param {Object} input | ||
* @param {number} input.x | ||
* @param {number} input.y | ||
*/ | ||
declare function test1(a?: number, input: { | ||
x: number; | ||
y: number; | ||
}): void; | ||
|
||
/** | ||
* @class | ||
*/ | ||
declare class Test12345 { | ||
/** | ||
* @function | ||
* @memberof Test12345 | ||
* @name f | ||
* @return {number[]} | ||
*/ | ||
static f(): number[]; | ||
/** | ||
* @function | ||
* @memberof Test12345 | ||
* @variation 1 | ||
* @name f | ||
* @param {string} key | ||
* @return {number} | ||
*/ | ||
static f(key: string): number; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,17 @@ | ||
/** | ||
* Interface for classes that represent a color. | ||
* | ||
* @interface | ||
*/ | ||
declare interface Color { | ||
/** | ||
* Get the color as an array of red, green, and blue values, represented as | ||
* decimal numbers between 0 and 1. | ||
* | ||
* @returns {Array<number>} An array containing the red, green, and blue values, | ||
* in that order. | ||
*/ | ||
rgb(): number[]; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,71 @@ | ||
/** | ||
* @namespace FoobarNS | ||
*/ | ||
declare namespace FoobarNS { | ||
/** | ||
* @classdesc | ||
* A Foo. | ||
* | ||
* @constructor | ||
* @template T | ||
*/ | ||
class Foo<T> { | ||
/** | ||
* A generic method. | ||
* @param {FoobarNS.Foo.FCallback} f A function. | ||
* @param [opt_this=10] An object. | ||
* @param {number[]|object<number, string[]>} [opt_2=10] An object. | ||
* @template S | ||
*/ | ||
f<S>(f: FoobarNS.Foo.FCallback, opt_this?: any, opt_2?: number[] | { | ||
[key: number]: string[]; | ||
}): void; | ||
} | ||
module Foo { | ||
/** | ||
* @callback FCallback | ||
* @this S | ||
* @memberof FoobarNS.Foo | ||
* @param {T} first - The first param. | ||
* @param {number} second - The second param. | ||
* @param {T[]} third - The third param. | ||
* @returns {*} | ||
*/ | ||
type FCallback = (this: S, first: T, second: number, third: T[]) => any; | ||
} | ||
/** | ||
* @classdesc | ||
* A Bar. | ||
* | ||
* @constructor | ||
* @extends FoobarNS.Foo | ||
*/ | ||
class Bar extends FoobarNS.Foo { | ||
/** | ||
* A method. | ||
*/ | ||
f(): void; | ||
} | ||
/** | ||
* @interface | ||
*/ | ||
interface CircleOptions { | ||
/** | ||
* Circle radius. | ||
* @type {number} | ||
*/ | ||
radius: number; | ||
} | ||
/** | ||
* @classdesc | ||
* Set circle style for vector features. | ||
* | ||
* @constructor | ||
* @param {FoobarNS.CircleOptions=} opt_options Options. | ||
*/ | ||
class Circle { | ||
constructor(opt_options?: FoobarNS.CircleOptions); | ||
} | ||
} | ||
|
||
|
Oops, something went wrong.