API
simple package
This is a test package.
class Hello {
public count: number = 0 + 1
public text?: string = 'hello world!'
}
Classes
Class | Description |
---|---|
Hello |
Describe a Hello object. |
TestClass |
Enumerations
Enumeration | Description |
---|---|
Align |
Text alignment. |
Functions
Function | Description |
---|---|
count() |
Interfaces
Interface | Description |
---|---|
Point |
A single point. |
Namespaces
Namespace | Description |
---|---|
test |
Variables
Variable | Description |
---|---|
PI_CONSTANT |
See Hello.print. |
printMessage |
Print a welcome message. |
Type Aliases
Type Alias | Description |
---|---|
ABC |
|
Int |
Align enum
Text alignment.
export declare const enum Align
Member | Value | Description |
---|---|---|
center |
"center" |
Align center. |
left |
"left" |
Align left. |
right |
"right" |
Align right. |
Remarks
Actual value is a string.
count() function
export declare function count(): number
Hello class
Describe a Hello object.
export declare class Hello
Properties
Property | Type | Description |
---|---|---|
one |
number |
Number one. |
Methods
Method | Description |
---|---|
print() |
Print a message. |
sayHello() |
Remarks
Doesn’t do much except printing to console.
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the Hello
class.
Hello.one property
Number one.
one: number
Hello.print() method
Print a message.
print(i: number): void
Parameters
Parameter | Type | Description |
---|---|---|
i |
number |
print this number |
Return value
Doesn’t return anything.
Hello.sayHello() method
sayHello(i?: number, ...texts: string[]): void
Parameters
Parameter | Type | Description |
---|---|---|
i |
number |
|
texts |
string[] |
Point interface
A single point.
export interface Point
Properties
Property | Type | Description |
---|---|---|
x |
number |
x coordinate. |
y |
number |
y coordinate. |
Point.x property
x coordinate.
x: number
Point.y property
y coordinate.
y: number
test namespace
export declare namespace test
Variables
Variable | Description |
---|---|
defaultValue |
|
recall |
test.defaultValue variable
defaultValue = 1
test.recall variable
recall: () => number
TestClass class
Unstable: beta
export declare class TestClass
Constructors
Properties
Property | Type | Description |
---|---|---|
text |
string |
TestClass.(constructor)()
Constructs a new instance of the TestClass
class.
constructor(text: string, callback: () => void)
Parameters
Parameter | Type | Description |
---|---|---|
text |
string |
Text value. |
callback |
() => void |
Callback function. |
TestClass.(constructor)()
Constructs a new instance of the TestClass
class.
constructor(text: string, inverse: boolean)
Parameters
Parameter | Type | Description |
---|---|---|
text |
string |
Text value. |
inverse |
boolean |
Reverse the text. |
TestClass.text property
text: string
ABC type
export declare type ABC = string
Int type
export declare type Int = number
PI_CONSTANT variable
See Hello.print.
PI_CONSTANT = 3.14
printMessage variable
Unstable: beta
Print a welcome message.
printMessage: () => void