forked from englercj/tsd-jsdoc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test case from englercj#105 to confirm that it's resolved
- Loading branch information
1 parent
fe18a88
commit 84c1750
Showing
3 changed files
with
63 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* Creates a new animal. | ||
*/ | ||
declare class Animal { | ||
/** | ||
* Move the animal to the specified location. | ||
* @param x - X-coordinate. | ||
* @param y - Y-coordinate. | ||
*/ | ||
move(x: number, y: number): void; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** | ||
* @constructor | ||
* @name Animal | ||
* @classdesc An animal. | ||
* @description Creates a new animal. | ||
*/ | ||
function Animal() { | ||
this.x = 0; | ||
this.y = 0; | ||
} | ||
|
||
/** | ||
* @function | ||
* @name Animal#move | ||
* @description Move the animal to the specified location. | ||
* @param {Number} x - X-coordinate. | ||
* @param {Number} y - Y-coordinate. | ||
*/ | ||
Animal.prototype.move = function (x, y) { | ||
this.x = x; | ||
this.y = y; | ||
} | ||
|
||
/** | ||
* @private | ||
* @constructor | ||
* @name Dog | ||
* @extends Animal | ||
* @classdesc A dog. | ||
* @description Creates a new dog. | ||
*/ | ||
function Dog() {} | ||
|
||
Dog.prototype = Object.create(Animal.prototype); | ||
Dog.prototype.constructor = Dog; | ||
|
||
/** | ||
* @private | ||
* @function | ||
* @name Dog#bark | ||
* @description The dog barks. | ||
*/ | ||
Dog.prototype.bark = function () { | ||
console.log('Woof!'); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { expectJsDoc } from '../lib'; | ||
|
||
suite('Private Checks', () => { | ||
test('All', () => { | ||
expectJsDoc('private_all'); | ||
}); | ||
}); |