Merge pull request #5645 from DanielRosenwasser/handleExtraObjectLiteralProperties

Handle extra object literal properties (Part V)
This commit is contained in:
Daniel Rosenwasser
2015-09-02 12:05:40 -07:00
33 changed files with 3054 additions and 2812 deletions
+26 -20
View File
@@ -52,11 +52,11 @@ declare module CryptoJS{
init(cfg?: C): void
create(cfg?: C): IHasher<C>
update(messageUpdate: WordArray): Hasher
update(messageUpdate: string): Hasher
update(messageUpdate: WordArray): Hasher
finalize(messageUpdate?: WordArray): WordArray
finalize(messageUpdate?: string): WordArray
finalize(messageUpdate?: WordArray): WordArray
blockSize: number
@@ -69,16 +69,16 @@ declare module CryptoJS{
//tparam C - Configuration type
interface IHasherHelper<C>{
(message: WordArray, cfg?: C): WordArray
(message: string, cfg?: C): WordArray
(message: WordArray, cfg?: C): WordArray
}
interface HasherHelper extends IHasherHelper<Object>{}
interface IHasherHmacHelper{
(message: WordArray, key: WordArray): WordArray
(message: string, key: string): WordArray
(message: string, key: WordArray): WordArray
(message: WordArray, key: string): WordArray
(message: string, key: string): WordArray
(message: WordArray, key: WordArray): WordArray
}
//tparam C - Configuration type
@@ -90,11 +90,11 @@ declare module CryptoJS{
create(xformMode?: number, key?: WordArray, cfg?: C): ICipher<C>
init(xformMode?: number, key?: WordArray, cfg?: C): void
process(dataUpdate: WordArray): WordArray
process(dataUpdate: string): WordArray
process(dataUpdate: WordArray): WordArray
finalize(dataUpdate?: WordArray): WordArray
finalize(dataUpdate?: string): WordArray
finalize(dataUpdate?: WordArray): WordArray
keySize: number
ivSize: number
@@ -128,6 +128,7 @@ declare module CryptoJS{
interface BlockCipher extends IStreamCipher<IBlockCipherCfg>{}
interface IBlockCipherCfg {
iv?: WordArray;
mode?: mode.IBlockCipherModeImpl //default CBC
padding?: pad.IPaddingImpl //default Pkcs7
}
@@ -163,6 +164,9 @@ declare module CryptoJS{
interface SerializableCipher extends ISerializableCipher<ISerializableCipherCfg>{}
interface ISerializableCipherCfg{
format?: format.IFormatter //default OpenSSLFormatter
iv?: WordArray;
mode?: mode.IBlockCipherModeImpl;
padding?: pad.IPaddingImpl;
}
interface IPasswordBasedCipher<C extends IPasswordBasedCipherCfg> extends Base{
@@ -177,19 +181,21 @@ declare module CryptoJS{
interface PasswordBasedCipher extends IPasswordBasedCipher<IPasswordBasedCipherCfg>{}
interface IPasswordBasedCipherCfg extends ISerializableCipherCfg{
kdf?: kdf.IKdfImpl //default OpenSSLKdf
mode?: mode.IBlockCipherModeImpl;
padding?: pad.IPaddingImpl;
}
/** see Cipher._createHelper */
interface ICipherHelper<C>{
encrypt(message: WordArray, key: WordArray, cfg?: C): CipherParams
encrypt(message: string, password: string, cfg?: C): CipherParams
encrypt(message: string, key: WordArray, cfg?: C): CipherParams
encrypt(message: WordArray, password: string, cfg?: C): CipherParams
encrypt(message: string, password: string, cfg?: C): CipherParams
encrypt(message: WordArray, key: WordArray, cfg?: C): CipherParams
decrypt(ciphertext: CipherParamsData, key: WordArray, cfg?: C): WordArray
decrypt(ciphertext: string, password: string, cfg?: C): WordArray
decrypt(ciphertext: string, key: WordArray, cfg?: C): WordArray
decrypt(ciphertext: CipherParamsData, password: string, cfg?: C): WordArray
decrypt(ciphertext: string, password: string, cfg?: C): WordArray
decrypt(ciphertext: CipherParamsData, key: WordArray, cfg?: C): WordArray
}
interface CipherHelper extends ICipherHelper<Object>{}
@@ -228,8 +234,8 @@ declare module CryptoJS{
}
interface IKdfImpl{
execute(password: string, keySize: number, ivSize: number, salt?: lib.WordArray): lib.CipherParams
execute(password: string, keySize: number, ivSize: number, salt?: string): lib.CipherParams
execute(password: string, keySize: number, ivSize: number, salt?: lib.WordArray): lib.CipherParams
}
}
@@ -305,26 +311,26 @@ declare module CryptoJS{
}
interface HMAC extends lib.Base{
init(hasher?: lib.Hasher, key?: lib.WordArray): void
init(hasher?: lib.Hasher, key?: string): void
create(hasher?: lib.Hasher, key?: lib.WordArray): HMAC
init(hasher?: lib.Hasher, key?: lib.WordArray): void
create(hasher?: lib.Hasher, key?: string): HMAC
create(hasher?: lib.Hasher, key?: lib.WordArray): HMAC
update(messageUpdate: lib.WordArray): HMAC
update(messageUpdate: string): HMAC
update(messageUpdate: lib.WordArray): HMAC
finalize(messageUpdate?: lib.WordArray): lib.WordArray
finalize(messageUpdate?: string): lib.WordArray
finalize(messageUpdate?: lib.WordArray): lib.WordArray
}
interface EvpKDF extends lib.Base{
cfg: IEvpKDFCfg
init(cfg?: IEvpKDFCfg): void
create(cfg?: IEvpKDFCfg): EvpKDF
compute(password: lib.WordArray, salt: lib.WordArray): lib.WordArray
compute(password: string, salt: string): lib.WordArray
compute(password: string, salt: lib.WordArray): lib.WordArray
compute(password: lib.WordArray, salt: string): lib.WordArray
compute(password: string, salt: string): lib.WordArray
compute(password: lib.WordArray, salt: lib.WordArray): lib.WordArray
}
interface IEvpKDFCfg{
keySize?: number //default 128/32
@@ -332,10 +338,10 @@ declare module CryptoJS{
iterations?: number //default 1
}
interface IEvpKDFHelper{
(password: lib.WordArray, salt: lib.WordArray, cfg?: IEvpKDFCfg): lib.WordArray
(password: string, salt: string, cfg?: IEvpKDFCfg): lib.WordArray
(password: string, salt: lib.WordArray, cfg?: IEvpKDFCfg): lib.WordArray
(password: lib.WordArray, salt: string, cfg?: IEvpKDFCfg): lib.WordArray
(password: string, salt: string, cfg?: IEvpKDFCfg): lib.WordArray
(password: lib.WordArray, salt: lib.WordArray, cfg?: IEvpKDFCfg): lib.WordArray
}
interface PBKDF2 extends EvpKDF{} //PBKDF2 is same as EvpKDF
+1 -1
View File
@@ -50,7 +50,7 @@ YUI.add('algo-aes-test', function (Y) {
var expectedKey = key.toString();
var expectedIv = iv.toString();
C.AES.encrypt(message, key, { iv: iv });
C.AES.encrypt(message, key, { iv });
Y.Assert.areEqual(expectedMessage, message.toString());
Y.Assert.areEqual(expectedKey, key.toString());
+1 -1
View File
@@ -74,7 +74,7 @@ YUI.add('algo-des-test', function (Y) {
var expectedKey = key.toString();
var expectedIv = iv.toString();
C.DES.encrypt(message, key, { iv: iv });
C.DES.encrypt(message, key, { iv });
Y.Assert.areEqual(expectedMessage, message.toString());
Y.Assert.areEqual(expectedKey, key.toString());
+1 -1
View File
@@ -58,7 +58,7 @@ YUI.add('algo-tripledes-test', function (Y) {
var expectedKey = key.toString();
var expectedIv = iv.toString();
C.TripleDES.encrypt(message, key, { iv: iv });
C.TripleDES.encrypt(message, key, { iv });
Y.Assert.areEqual(expectedMessage, message.toString());
Y.Assert.areEqual(expectedKey, key.toString());
+1 -1
View File
@@ -120,7 +120,7 @@ module Tests.ui {
$('<div/>').dxAutocomplete({
items: ["Bern", "Lyon", "Lander"],
value: options.value,
onValueChange: function (e:{ value: string }) {
onValueChanged: function (e:{ value: string }) {
options.setValue(e.value);
}
}).appendTo(container);
+180 -117
View File
@@ -1789,7 +1789,7 @@ declare module DevExpress.ui {
interval?: number;
/** Specifies the maximum zoom level of a calendar, which is used to pick the date. */
maxZoomLevel?: string;
/** Specifies the minimal zoom level of a calendar, which is used to pick the date. */
/** Specifies the minimal zoom level of a calendar, which is used to pick the date. */
minZoomLevel?: string;
/** Specifies the type of date/time picker. */
pickerType?: string;
@@ -1827,8 +1827,8 @@ declare module DevExpress.ui {
maxZoomLevel?: string;
/** Specifies the minimum zoom level of the calendar. */
minZoomLevel?: string;
/** The template to be used for rendering calendar cells. */
cellTemplate?: any;
/** The template to be used for rendering calendar cells. */
cellTemplate?: any;
}
/** A calendar widget. */
export class dxCalendar extends Editor {
@@ -1887,14 +1887,77 @@ declare module DevExpress.ui {
constructor(element: Element, options?: dxBoxOptions);
}
export interface dxAutocompleteOptions extends dxDropDownListOptions {
/** Specifies the current value displayed by the widget. */
value?: string;
/** The minimum number of characters that must be entered into the text box to begin a search. */
minSearchLength?: number;
accessKey?: string;
activeStateEnabled?: boolean;
attr?: any;
dataSource?: any;
disabled?: boolean;
displayValue?: string;
fieldEditEnabled?: boolean;
focusStateEnabled?: boolean;
height?: string | number | (() => string | number);
hint?: string;
hoverStateEnabled?: boolean;
isValid?: boolean;
items?: any[];
/**
* The template to be used for rendering items.
* Defaults Value: "item"
*/
itemTemplate?: string | Node | JQuery | (() => string | Node | JQuery);
/** Specifies the maximum count of items displayed by the widget. */
maxItemCount?: number;
maxLength?: string | number;
/** The minimum number of characters that must be entered into the text box to begin a search. */
minSearchLength?: number;
mode?: string; // "text" | "email" | "search" | "tel" | "url" | "password"
onChange?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onClosed?: (e: { component: any; element: JQuery; model: any }) => void;
onContentReady?: (e: { component: any; element: JQuery; model: any }) => void;
onCopy?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onCut?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onDisposing?: (e: { component: any; element: JQuery; model: any }) => void;
onEnterKey?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onFocusIn?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onFocusOut?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onInitialized?: (e: { component: any; element: JQuery }) => void;
onInput?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onItemClick?: (e: { component: any; element: JQuery; model: any; itemElement: HTMLElement }) => void;
onKeyDown?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onKeyPress?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onKeyUp?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onOpened?: (e: { component: any; element: JQuery; model: any }) => void;
onOptionChanged?: (e: { component: any; element: JQuery; model: any; value: any }) => void;
onPaste?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void;
onSelectionChanged?: (e: { component: any; element: JQuery; model: any; selectedItem: any }) => void;
onValueChanged?: (e: { component: any; element: JQuery; model: any; value: any; previousValue: any; itemData: any; jQueryEvent: JQueryEventObject }) => void;
opened?: boolean;
placeholder?: string;
readOnly?: boolean;
rtlEnabled?: boolean;
searchExpr?: string;
searchMode?: string; // "contains" | "startswith"
searchTimeout?: number;
/** Gets the currently selected item. */
selectedItem?: Object;
selectedItem?: any;
showClearButton?: boolean;
spellcheck?: boolean;
tabIndex?: number;
text?: string;
validationError?: any;
validationMessageMode?: string; // "auto" | "always"
/** Specifies the current value displayed by the widget. */
value?: string;
/**
* CAn be any DOM event names separated by spaces.
*/
valueChangeEvent?: string;
valueExpr?: string | Function;
visible?: boolean;
width?: string | number | (() => string | number);
}
/** A textbox widget that supports autocompletion. */
export class dxAutocomplete extends dxDropDownList {
@@ -2979,8 +3042,8 @@ declare module DevExpress.ui {
/** Specifies whether or not a user can nullify values of a lookup column. */
allowClearing?: boolean;
/**
Specifies the data source providing data for a lookup column.
*/
* Specifies the data source providing data for a lookup column.
*/
dataSource?: any;
/** Specifies the expression defining the data source field whose values must be displayed. */
displayExpr?: any;
@@ -3109,9 +3172,9 @@ Specifies the data source providing data for a lookup column.
}
};
/**
An array of grid columns.
*/
columns?: Array<dxDataGridColumn>;
* An array of grid columns.
*/
columns?: dxDataGridColumn[];
onContentReady?: Function;
contentReadyAction?: Function;
/** Specifies a function that customizes grid columns after they are created. */
@@ -3209,8 +3272,8 @@ An array of grid columns.
/** Specifies the message displayed in a group row when the corresponding group is continued from the previous page. */
groupContinuedMessage?: string;
/**
Specifies the message displayed in a group row when the corresponding group continues on the next page.
*/
* Specifies the message displayed in a group row when the corresponding group continues on the next page.
*/
groupContinuesMessage?: string;
};
/** Specifies options that configure the group panel. */
@@ -3591,8 +3654,8 @@ Specifies the message displayed in a group row when the corresponding group cont
/** Saves changes made in a grid. */
saveEditData(): void;
/**
Searches grid records by a search string.
*/
* Searches grid records by a search string.
*/
searchByText(text: string): void;
/** Selects all grid records. */
selectAll(): void;
@@ -4304,7 +4367,7 @@ declare module DevExpress.viz.charts {
clearSelection(): void;
/** Gets the color of a particular series. */
getColor(): string;
/**
/**
* Gets a point from the series point collection based on the specified argument.
* @deprecated getPointsByArg(pointArg).md
*/
@@ -4509,8 +4572,8 @@ declare module DevExpress.viz.charts {
/** Specifies a precision for the percentage values displayed in the labels of a full-stacked-like series. */
percentPrecision?: number;
}
export interface BaseCommonSeriesConfig {
/** Specifies the data source field that provides arguments for series points. */
export interface BaseCommonSeriesConfig {
/** Specifies the data source field that provides arguments for series points. */
argumentField?: string;
axis?: string;
/** An object defining the label configuration options for a series in the dxChart widget. */
@@ -4570,30 +4633,30 @@ declare module DevExpress.viz.charts {
visible?: boolean;
/** Specifies a line width. */
width?: number;
/** Configures error bars. */
valueErrorBar?: {
/** Specifies whether error bars must be displayed in full or partially. */
displayMode?: string;
/** Specifies the data field that provides data for low error values. */
lowValueField?: string;
/** Specifies the data field that provides data for high error values. */
highValueField?: string;
/** Specifies how error bar values must be calculated. */
type?: string;
/** Specifies the value to be used for generating error bars. */
value?: number;
/** Specifies the color of error bars. */
color?: string;
/** Specifies the opacity of error bars. */
opacity?: number;
/** Specifies the length of the lines that indicate the error bar edges. */
/** Configures error bars. */
valueErrorBar?: {
/** Specifies whether error bars must be displayed in full or partially. */
displayMode?: string;
/** Specifies the data field that provides data for low error values. */
lowValueField?: string;
/** Specifies the data field that provides data for high error values. */
highValueField?: string;
/** Specifies how error bar values must be calculated. */
type?: string;
/** Specifies the value to be used for generating error bars. */
value?: number;
/** Specifies the color of error bars. */
color?: string;
/** Specifies the opacity of error bars. */
opacity?: number;
/** Specifies the length of the lines that indicate the error bar edges. */
edgeLength?: number;
/** Specifies the width of the error bar line. */
lineWidth?: number;
};
}
export interface CommonPointOptions {
/** Specifies border options for points in the line and area series. */
/** Specifies the width of the error bar line. */
lineWidth?: number;
};
}
export interface CommonPointOptions {
/** Specifies border options for points in the line and area series. */
border?: viz.core.Border;
/** Specifies the points color. */
color?: string;
@@ -4624,9 +4687,9 @@ declare module DevExpress.viz.charts {
/** Specifies a symbol for presenting points of the line and area series. */
symbol?: string;
visible?: boolean;
}
export interface ChartCommonPointOptions extends CommonPointOptions {
/** An object specifying the parameters of an image that is used as a point marker. */
}
export interface ChartCommonPointOptions extends CommonPointOptions {
/** An object specifying the parameters of an image that is used as a point marker. */
image?: {
/** Specifies the height of an image that is used as a point marker. */
height?: any;
@@ -4635,9 +4698,9 @@ declare module DevExpress.viz.charts {
/** Specifies the width of an image that is used as a point marker. */
width?: any;
};
}
export interface PolarCommonPointOptions extends CommonPointOptions {
/** An object specifying the parameters of an image that is used as a point marker. */
}
export interface PolarCommonPointOptions extends CommonPointOptions {
/** An object specifying the parameters of an image that is used as a point marker. */
image?: {
/** Specifies the height of an image that is used as a point marker. */
height?: number;
@@ -4646,7 +4709,7 @@ declare module DevExpress.viz.charts {
/** Specifies the width of an image that is used as a point marker. */
width?: number;
};
}
}
/** An object that defines configuration options for chart series. */
export interface CommonSeriesConfig extends BaseCommonSeriesConfig {
/** Specifies the data source field that provides a 'close' value for a _candleStick_ or _stock_ series. */
@@ -4737,14 +4800,14 @@ declare module DevExpress.viz.charts {
/** Sets the series type. */
type?: string;
}
/** An object that defines configuration options for polar chart series. */
export interface CommonPolarSeriesConfig extends BaseCommonSeriesConfig {
/** Specifies whether or not to close the chart by joining the end point with the first point. */
/** An object that defines configuration options for polar chart series. */
export interface CommonPolarSeriesConfig extends BaseCommonSeriesConfig {
/** Specifies whether or not to close the chart by joining the end point with the first point. */
closed?: boolean;
label?: SeriesConfigLabel;
point?: PolarCommonPointOptions;
}
export interface CommonPolarSeriesSettings extends CommonPolarSeriesConfig {
}
export interface CommonPolarSeriesSettings extends CommonPolarSeriesConfig {
/** An object that specifies configuration options for all series of the <i>area</i> type in the chart. */
area?: CommonPolarSeriesConfig;
/** An object that specifies configuration options for all series of the _bar_ type in the chart. */
@@ -4842,7 +4905,7 @@ declare module DevExpress.viz.charts {
/** Specifies a data source field that represents the series name. */
nameField?: string;
}
export interface PolarSeriesTemplate {
export interface PolarSeriesTemplate {
/** Specifies a callback function that returns a series object with individual series settings. */
customizeSeries?: (seriesName: string) => PolarSeriesConfig;
/** Specifies a data source field that represents the series name. */
@@ -4859,18 +4922,18 @@ declare module DevExpress.viz.charts {
export interface PolarCommonConstantLineLabel {
/** Indicates whether or not to display labels for the axis constant lines. */
visible?: boolean;
/** Specifies font options for a constant line label. */
/** Specifies font options for a constant line label. */
font?: viz.core.Font;
}
export interface ConstantLineStyle {
/** Specifies a color for a constant line. */
}
export interface ConstantLineStyle {
/** Specifies a color for a constant line. */
color?: string;
/** Specifies a dash style for a constant line. */
dashStyle?: string;
/** Specifies a constant line width in pixels. */
width?: number;
}
export interface ChartCommonConstantLineStyle extends ConstantLineStyle {
}
export interface ChartCommonConstantLineStyle extends ConstantLineStyle {
/** An object defining constant line label options. */
label?: ChartCommonConstantLineLabel;
/** Specifies the space between the constant line label and the left/right side of the constant line. */
@@ -4878,24 +4941,24 @@ declare module DevExpress.viz.charts {
/** Specifies the space between the constant line label and the top/bottom side of the constant line. */
paddingTopBottom?: number;
}
export interface PolarCommonConstantLineStyle extends ConstantLineStyle {
/** An object defining constant line label options. */
export interface PolarCommonConstantLineStyle extends ConstantLineStyle {
/** An object defining constant line label options. */
label?: PolarCommonConstantLineLabel;
}
export interface CommonAxisLabel {
/** Specifies font options for axis labels. */
}
export interface CommonAxisLabel {
/** Specifies font options for axis labels. */
font?: viz.core.Font;
/** Specifies the spacing between an axis and its labels in pixels. */
indentFromAxis?: number;
/** Indicates whether or not axis labels are visible. */
visible?: boolean;
}
}
export interface ChartCommonAxisLabel extends CommonAxisLabel {
/** Specifies the label's position relative to the tick (grid line). */
alignment?: string;
/** Specifies the overlap resolving algorithm to be applied to axis labels. */
/** Specifies the overlap resolving algorithm to be applied to axis labels. */
overlappingBehavior?: {
/** Specifies how to arrange axis labels. */
/** Specifies how to arrange axis labels. */
mode?: string;
/** Specifies the angle used to rotate axis labels. */
rotationAngle?: number;
@@ -4907,7 +4970,7 @@ declare module DevExpress.viz.charts {
/** Specifies the overlap resolving algorithm to be applied to axis labels. */
overlappingBehavior?: string;
}
export interface CommonAxisTitle {
export interface CommonAxisTitle {
/** Specifies font options for an axis title. */
font?: viz.core.Font;
/** Specifies a margin for an axis title in pixels. */
@@ -4916,7 +4979,7 @@ declare module DevExpress.viz.charts {
export interface BaseCommonAxisSettings {
/** Specifies the color of the line that represents an axis. */
color?: string;
/** Specifies whether ticks/grid lines of a discrete axis are located between labels or cross the labels. */
/** Specifies whether ticks/grid lines of a discrete axis are located between labels or cross the labels. */
discreteAxisDivisionMode?: string;
/** An object defining the configuration options for the grid lines of an axis in the dxPolarChart widget. */
grid?: {
@@ -4929,7 +4992,7 @@ declare module DevExpress.viz.charts {
/** Specifies the width of grid lines. */
width?: number;
};
/** Specifies the options of the minor grid. */
/** Specifies the options of the minor grid. */
minorGrid?: {
/** Specifies a color for the lines of the minor grid. */
color?: string;
@@ -4955,7 +5018,7 @@ declare module DevExpress.viz.charts {
/** Indicates whether or not ticks are visible on an axis. */
visible?: boolean;
};
/** Specifies the options of the minor ticks. */
/** Specifies the options of the minor ticks. */
minorTick?: {
/** Specifies a color for the minor ticks. */
color?: string;
@@ -4969,18 +5032,18 @@ declare module DevExpress.viz.charts {
/** Specifies the width of the line that represents an axis in the chart. */
width?: number;
}
export interface ChartCommonAxisSettings extends BaseCommonAxisSettings {
export interface ChartCommonAxisSettings extends BaseCommonAxisSettings {
/** Specifies the appearance of all the widget's constant lines. */
constantLineStyle?: ChartCommonConstantLineStyle;
/** An object defining the label configuration options that are common for all axes in the dxChart widget. */
label?: ChartCommonAxisLabel;
/** Specifies a coefficient that determines the spacing between the maximum series point and the axis. */
maxValueMargin?: number;
maxValueMargin?: number;
/** Specifies a coefficient that determines the spacing between the minimum series point and the axis. */
minValueMargin?: number;
minValueMargin?: number;
/** Specifies, in pixels, the space reserved for an axis. */
placeholderSize?: number;
/** An object defining configuration options for strip style. */
/** An object defining configuration options for strip style. */
stripStyle?: {
/** An object defining the configuration options for a strip label style. */
label?: {
@@ -5001,7 +5064,7 @@ declare module DevExpress.viz.charts {
/** Indicates whether or not to display series with indents from axis boundaries. */
valueMarginsEnabled?: boolean;
}
export interface PolarCommonAxisSettings extends BaseCommonAxisSettings {
export interface PolarCommonAxisSettings extends BaseCommonAxisSettings {
/** Specifies the appearance of all the widget's constant lines. */
constantLineStyle?: PolarCommonConstantLineStyle;
/** An object defining the label configuration options that are common for all axes in the dxPolarChart widget. */
@@ -5023,12 +5086,12 @@ declare module DevExpress.viz.charts {
/** Specifies the text to be displayed in a constant line label. */
text?: string;
}
export interface PolarConstantLineLabel extends PolarCommonConstantLineLabel {
export interface PolarConstantLineLabel extends PolarCommonConstantLineLabel {
/** Specifies the text to be displayed in a constant line label. */
text?: string;
}
export interface AxisLabel {
/** Specifies the text for a hint that appears when a user hovers the mouse pointer over a label on the value axis. */
export interface AxisLabel {
/** Specifies the text for a hint that appears when a user hovers the mouse pointer over a label on the value axis. */
customizeHint?: (argument: { value: any; valueText: string }) => string;
/** Specifies a callback function that returns the text to be displayed in value axis labels. */
customizeText?: (argument: { value: any; valueText: string }) => string;
@@ -5036,9 +5099,9 @@ declare module DevExpress.viz.charts {
format?: string;
/** Specifies a precision for the formatted value displayed in the axis labels. */
precision?: number;
}
}
export interface ChartAxisLabel extends ChartCommonAxisLabel, AxisLabel {}
export interface PolarAxisLabel extends PolarCommonAxisLabel, AxisLabel {}
export interface PolarAxisLabel extends PolarCommonAxisLabel, AxisLabel {}
export interface AxisTitle extends CommonAxisTitle {
/** Specifies the text for the value axis title. */
text?: string;
@@ -5048,19 +5111,19 @@ declare module DevExpress.viz.charts {
label?: ChartConstantLineLabel;
}
export interface ChartConstantLine extends ChartConstantLineStyle {
/** An object defining constant line label options. */
/** An object defining constant line label options. */
label?: ChartConstantLineLabel;
/** Specifies a value to be displayed by a constant line. */
value?: any;
}
export interface PolarConstantLine extends PolarCommonConstantLineStyle {
/** An object defining constant line label options. */
}
export interface PolarConstantLine extends PolarCommonConstantLineStyle {
/** An object defining constant line label options. */
label?: PolarConstantLineLabel;
/** Specifies a value to be displayed by a constant line. */
value?: any;
}
export interface Axis {
/** Specifies a coefficient for dividing the value axis. */
}
export interface Axis {
/** Specifies a coefficient for dividing the value axis. */
axisDivisionFactor?: number;
/** Specifies the order in which discrete values are arranged on the value axis. */
categories?: Array<any>;
@@ -5074,11 +5137,11 @@ declare module DevExpress.viz.charts {
minorTickCount?: number;
/** Specifies the required type of the value axis. */
type?: string;
/** Specifies the pane on which the current value axis will be displayed. */
/** Specifies the pane on which the current value axis will be displayed. */
pane?: string;
/** Specifies options for value axis strips. */
strips?: Array<Strip>;
}
}
export interface ChartAxis extends ChartCommonAxisSettings, Axis {
/** Defines an array of the value axis constant lines. */
constantLines?: Array<ChartConstantLine>;
@@ -5095,52 +5158,52 @@ declare module DevExpress.viz.charts {
/** Specifies the title for a value axis. */
title?: AxisTitle;
}
export interface PolarAxis extends PolarCommonAxisSettings, Axis {
export interface PolarAxis extends PolarCommonAxisSettings, Axis {
/** Defines an array of the value axis constant lines. */
constantLines?: Array<PolarConstantLine>;
/** Specifies options for value axis labels. */
label?: PolarAxisLabel;
}
export interface ArgumentAxis {
/** Specifies the desired type of axis values. */
export interface ArgumentAxis {
/** Specifies the desired type of axis values. */
argumentType?: string;
/** Specifies the elements that will be highlighted when the argument axis is hovered over. */
hoverMode?: string;
}
}
export interface ChartArgumentAxis extends ChartAxis, ArgumentAxis {}
export interface PolarArgumentAxis extends PolarAxis, ArgumentAxis {
/** Specifies a start angle for the argument axis in degrees. */
export interface PolarArgumentAxis extends PolarAxis, ArgumentAxis {
/** Specifies a start angle for the argument axis in degrees. */
startAngle?: number;
/** Specifies whether or not to display the first point at the angle specified by the startAngle option. */
firstPointOnStartAngle?: boolean;
/** Specifies the period of the argument values in the data source. */
period?: number;
}
export interface ValueAxis {
}
export interface ValueAxis {
/** Specifies the name of the value axis. */
name?: string;
/** Specifies whether or not to indicate a zero value on the value axis. */
showZero?: boolean;
/** Specifies the desired type of axis values. */
valueType?: string;
}
}
export interface ChartValueAxis extends ChartAxis, ValueAxis {
/** Specifies the spacing, in pixels, between multiple value axes in a chart. */
multipleAxesSpacing?: number;
/** Specifies the value by which the chart's value axes are synchronized. */
synchronizedValue?: number;
}
export interface PolarValueAxis extends PolarAxis, ValueAxis {
/** Indicates whether to display series with indents from axis boundaries. */
valueMarginsEnabled?: boolean;
/** Specifies a coefficient that determines the spacing between the maximum series point and the axis. */
export interface PolarValueAxis extends PolarAxis, ValueAxis {
/** Indicates whether to display series with indents from axis boundaries. */
valueMarginsEnabled?: boolean;
/** Specifies a coefficient that determines the spacing between the maximum series point and the axis. */
maxValueMargin?: number;
/** Specifies a coefficient that determines the spacing between the minimum series point and the axis. */
minValueMargin?: number;
tick?: {
visible?: boolean;
}
}
tick?: {
visible?: boolean;
}
}
export interface CommonPane {
/** Specifies a background color in a pane. */
backgroundColor?: string;
@@ -5281,7 +5344,7 @@ declare module DevExpress.viz.charts {
asyncSeriesRendering?: boolean;
}): void;
}
export interface AdvancedLegend extends core.BaseLegend {
export interface AdvancedLegend extends core.BaseLegend {
/** Specifies the text for a hint that appears when a user hovers the mouse pointer over a legend item. */
customizeHint?: (seriesInfo: { seriesName: string; seriesIndex: number; seriesColor: string; }) => string;
/** <p>Specifies a callback function that returns the text to be displayed by legend items.</p> */
@@ -5463,7 +5526,7 @@ declare module DevExpress.viz.charts {
/** Specifies whether or not point labels can be hidden when the layout is adapting. */
keepLabels?: boolean;
};
/** Indicates whether or not to display a "spider web". */
/** Indicates whether or not to display a "spider web". */
useSpiderWeb?: boolean;
/** Specifies argument axis options for the dxPolarChart widget. */
argumentAxis?: PolarArgumentAxis;
@@ -6035,8 +6098,8 @@ Specifies an interval between minor ticks.
useTicksAutoArrangement?: boolean;
/** Specifies the type of values on the scale. */
valueType?: string;
/** Specifies the order of arguments on a discrete scale. */
categories?: Array<any>;
/** Specifies the order of arguments on a discrete scale. */
categories?: Array<any>;
};
/** Specifies the range to be selected when displaying the dxRangeSelector. */
selectedRange?: {
@@ -6337,9 +6400,9 @@ declare module DevExpress.viz.map {
centerChanged?: (center: Array<number>) => void;
/** A handler for the centerChanged event. */
onCenterChanged?: (e: {
center: Array<number>;
component: dxVectorMap;
element: Element;
center: Array<number>;
component: dxVectorMap;
element: Element;
}) => void;
/** A handler for the tooltipShown event. */
onTooltipShown?: (e: {
+23 -23
View File
@@ -1,29 +1,29 @@
/// <reference path="fbsdk.d.ts" />
window.fbAsyncInit = function() {
FB.init(
{
appId : '{your-app-id}',
xfbml : true,
version : 'v2.0'
}
);
FB.init(
{
appId : '{your-app-id}',
xfbml : true,
version : 'v2.0'
}
);
FB.ui(
{
method: 'share',
href: 'https://developers.facebook.com/docs/dialogs/'
},
function(response) {
console.log(response);
}
);
FB.ui(
{
method: 'share',
href: 'https://developers.facebook.com/docs/dialogs/'
},
function(response) {
console.log(response);
}
);
FB.api(
"/me",
"POST",
function (fbResponse){
console.log(fbResponse);
}
);
FB.api(
"/me",
"POST",
function (fbResponse){
console.log(fbResponse);
}
);
};
+130 -76
View File
@@ -4,132 +4,186 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface FBInitParams{
appId ?: string;
authResponse ?: string;
cookie ?: boolean;
frictionlessRequests ?: boolean;
hideFlashCallback ?: Function;
logging ?: boolean;
status ?: boolean;
version ?: string;
xfbml ?: boolean;
appId?: string;
authResponse?: string;
cookie?: boolean;
frictionlessRequests?: boolean;
hideFlashCallback?: Function;
logging?: boolean;
status?: boolean;
version?: string;
xfbml?: boolean;
}
interface FBUIParams{
method : string;
interface ShareDialogParams {
method: string; // "share"
href: string;
}
interface PageTabDialogParams {
method: string; // "pagetab"
app_id: string;
redirect_uri?: string;
display?: any;
}
interface RequestsDialogParams {
method: string; // "apprequests"
app_id: string;
redirect_uri?: string;
to?: string;
message: string;
action_type?: string; // "send" | "askfor" | "turn"
object_id?: string;
filters: string /* "app_users" | "app_non_users" */ | {
name: string;
user_ids: string[];
};
suggestions?: string[];
exclude_ids?: string[];
max_recipients?: number;
data?: string;
title?: string;
}
interface SendDialogParams {
method: string; // "send"
app_id: string;
redirect_uri?: string;
display?: any;
to?: string;
link: string;
}
interface PayDialogParams {
method: string; // "pay"
action: string; // "purchaseitem"
product: string;
quantity?: number;
quantity_min?: number;
quantity_max?: number;
request_id?: string;
pricepoint_id?: string;
test_currency?: string;
}
declare type FBUIParams = ShareDialogParams
| PageTabDialogParams
| RequestsDialogParams
| SendDialogParams
| PayDialogParams;
interface FBLoginOptions{
auth_type ?: string;
scope ?: string;
return_scopes ?: boolean;
enable_profile_selector ?: boolean;
profile_selector_ids ?: string;
auth_type?: string;
scope?: string;
return_scopes?: boolean;
enable_profile_selector?: boolean;
profile_selector_ids?: string;
}
interface FBSDKEvents{
/* This method allows you to subscribe to a range of events, and define callback functions for when they fire. */
subscribe(event : string, callback : (fbResponseObject : Object) => any) : void;
/* This method allows you to subscribe to a range of events, and define callback functions for when they fire. */
subscribe(event : string, callback : (fbResponseObject : Object) => any) : void;
/* This method allows you to un-subscribe a callback from any events previously subscribed to using .Event.subscribe(). */
unsubscribe(event : string, callback : (fbResponseObject : Object) => any) : void;
/* This method allows you to un-subscribe a callback from any events previously subscribed to using .Event.subscribe(). */
unsubscribe(event : string, callback : (fbResponseObject : Object) => any) : void;
}
interface FBSDKXFBML{
/* This function parses and renders XFBML markup in a document on the fly. */
parse(ParseElement ?: Element) : void;
parse(ParseElement ?: HTMLElement) : void;
/* This function parses and renders XFBML markup in a document on the fly. */
parse(ParseElement?: Element) : void;
parse(ParseElement?: HTMLElement) : void;
}
interface FBSDKCanvasPrefetcher{
/* Tells Facebook that the current page uses a specified resource. */
addStaticResource(res : string) : void;
/* Tells Facebook that the current page uses a specified resource. */
addStaticResource(res : string) : void;
/* Controls how statistics are collected on resources used by your application. */
setCollectionMode(option : string) : void;
/* Controls how statistics are collected on resources used by your application. */
setCollectionMode(option : string) : void;
}
interface FBSDKCanvasSize{
height ?: Number;
width ?: Number;
height?: Number;
width?: Number;
}
interface FBSDKCanvasDoneLoading{
time_delta_ms : Number;
time_delta_ms : Number;
}
interface FBSDKCanvas{
Prefetcher : FBSDKCanvasPrefetcher;
Prefetcher : FBSDKCanvasPrefetcher;
/* Hides the HTML element passed in via the elem param from view. */
hideFlashElement(element : Element) : void;
hideFlashElement(element : HTMLElement) : void;
/* Hides the HTML element passed in via the elem param from view. */
hideFlashElement(element : Element) : void;
hideFlashElement(element : HTMLElement) : void;
/* Displays the HTML element passed in via the elem param, after it has been hidden via FB.Canvas.hideFlashElement. */
showFlashElement(element : Element) : void;
showFlashElement(element : HTMLElement) : void;
/* Displays the HTML element passed in via the elem param, after it has been hidden via FB.Canvas.hideFlashElement. */
showFlashElement(element : Element) : void;
showFlashElement(element : HTMLElement) : void;
/* Tells Facebook to scroll to a specific location of your canvas page. */
scrollTo(x : Number, y : Number) : void;
/* Tells Facebook to scroll to a specific location of your canvas page. */
scrollTo(x : Number, y : Number) : void;
/* Starts or stops a timer which will grow your iframe to fit the content every few milliseconds. */
setAutoGrow(stopTimer : boolean) : void;
setAutoGrow(diffInterval : Number) : void;
setAutoGrow(stopTimer : boolean, diffInterval : Number) : void
/* Starts or stops a timer which will grow your iframe to fit the content every few milliseconds. */
setAutoGrow(stopTimer : boolean) : void;
setAutoGrow(diffInterval : Number) : void;
setAutoGrow(stopTimer : boolean, diffInterval : Number) : void
/* Tells Facebook to resize your iframe. */
setSize(canvasSizeOptions : FBSDKCanvasSize) : void;
/* Tells Facebook to resize your iframe. */
setSize(canvasSizeOptions : FBSDKCanvasSize) : void;
/* Registers the callback for inline processing (i.e. without page reload) of user actions when they click on any link to the current app from Canvas */
setUrlHandler(handler ?: Function) : string;
/* Registers the callback for inline processing (i.e. without page reload) of user actions when they click on any link to the current app from Canvas */
setUrlHandler(handler?: Function) : string;
/* Calls you back with an integer, in milliseconds, of the timing of the page load, beginning from the time when the first bytes arrive on
the client, and ending from the point at which you call this function.
*/
setDoneLoading(handler ?: Function) : FBSDKCanvasDoneLoading;
/* Calls you back with an integer, in milliseconds, of the timing of the page load, beginning from the time when the first bytes arrive on
the client, and ending from the point at which you call this function.
*/
setDoneLoading(handler?: Function) : FBSDKCanvasDoneLoading;
/* Call startTimer to resume the timer after a period of time for the page load that you didn't wish to measure, which you began by calling stopTimer. */
startTimer() : void;
/* Call startTimer to resume the timer after a period of time for the page load that you didn't wish to measure, which you began by calling stopTimer. */
startTimer() : void;
/* Call stopTimer when you wish to stop timing the page load for a period of time */
stopTimer(handler ?: (fbResponseObject : Object) => any) : void;
/* Call stopTimer when you wish to stop timing the page load for a period of time */
stopTimer(handler?: (fbResponseObject : Object) => any) : void;
}
interface FBSDK{
/* This method is used to initialize and setup the SDK. */
init(fbInitObject : FBInitParams) : void;
/* This method is used to initialize and setup the SDK. */
init(fbInitObject : FBInitParams) : void;
/* This method lets you make calls to the Graph API. */
api(path : string, method : string, callback : (fbResponseObject : Object) => any) : Object;
api(path : string, params : Object, callback : (fbResponseObject : Object) => any) : Object;
api(path : string, method : string, params : Object, callback : (fbResponseObject : Object) => any) : Object;
/* This method lets you make calls to the Graph API. */
api(path : string, method : string, callback : (fbResponseObject : Object) => any) : Object;
api(path : string, params : Object, callback : (fbResponseObject : Object) => any) : Object;
api(path : string, method : string, params : Object, callback : (fbResponseObject : Object) => any) : Object;
/* This method is used to trigger different forms of Facebook created UI dialogs. */
ui(params : FBUIParams, handler : (fbResponseObject : Object) => any) : void;
/* This method is used to trigger different forms of Facebook created UI dialogs. */
ui(params : FBUIParams, handler : (fbResponseObject : Object) => any) : void;
/* Allows you to determine if a user is logged in to Facebook and has authenticated your app */
getLoginStatus(handler : Function, force ?: Boolean) : void;
/* Allows you to determine if a user is logged in to Facebook and has authenticated your app */
getLoginStatus(handler : Function, force?: Boolean) : void;
/* Calling FB.login prompts the user to authenticate your application using the Login Dialog. */
login(handler : (fbResponseObject : Object) => any, params ?: FBLoginOptions): void;
/* Calling FB.login prompts the user to authenticate your application using the Login Dialog. */
login(handler : (fbResponseObject : Object) => any, params?: FBLoginOptions): void;
/* Log the user out of your site and Facebook */
logout(handler : (fbResponseObject : Object) => any) : void;
/* Log the user out of your site and Facebook */
logout(handler : (fbResponseObject : Object) => any) : void;
/* Synchronous accessor for the current authResponse. */
getAuthResponse() : Object;
/* Synchronous accessor for the current authResponse. */
getAuthResponse() : Object;
Event : FBSDKEvents;
XFBML : FBSDKXFBML;
Canvas : FBSDKCanvas;
Event : FBSDKEvents;
XFBML : FBSDKXFBML;
Canvas : FBSDKCanvas;
}
interface Window{
fbAsyncInit() : any;
fbAsyncInit() : any;
}
declare module "FB" {
export = FB;
export = FB;
}
declare var FB : FBSDK;
-1
View File
@@ -44,7 +44,6 @@ declare module GeoJSON {
*/
export interface MultiPoint extends GeometryObject
{
coordinates: Position[]
}
+5
View File
@@ -64,6 +64,11 @@ interface HeatmapConfiguration {
*/
radius?: number;
/**
* Scales the radius based on map zoom.
*/
scaleRadius?: boolean;
/*
* Indicate whether the heatmap should use a global extrema or a local
* extrema (the maximum and minimum of the currently displayed viewport)
+4 -2
View File
@@ -492,16 +492,18 @@ declare module PIXI {
//renderers
export interface RendererOptions {
view?: HTMLCanvasElement;
transparent?: boolean
antialias?: boolean;
resolution?: number;
clearBeforeRendering?: boolean;
preserveDrawingBuffer?: boolean;
forceFXAA?: boolean;
roundPixels?: boolean;
autoResize?: boolean;
backgroundColor?: number;
blendModes?: { [s: string]: any; };
clearBeforeRender?: boolean;
}
export class SystemRenderer extends EventEmitter {
+6
View File
@@ -64,6 +64,12 @@ interface IItemOptions
date: Date;
lat?: number;
long?: number;
enclosure?: {
url: string;
file?: string;
size?: number;
mime?: string;
}
itunesAuthor?: string;
itunesExplicit?: boolean;
itunesSubtitle?: string;
+1 -1
View File
@@ -8,7 +8,7 @@
interface Polyline {
decode(string: string, precision?: number): number[][];
encode(coordinate: number[][], precision?: number): string;
fromGeoJSON(geojson: GeoJSON.GeoJsonObject, precision?: number): string;
fromGeoJSON(geojson: GeoJSON.LineString | GeoJSON.Feature, precision?: number): string;
}
declare var polyline: Polyline;
+8 -6
View File
@@ -11,15 +11,17 @@ declare module polymer {
interface PropObjectType {
type: PropConstructorType;
value?:boolean|number|string|Function;
reflectToAttributes?:boolean;
notify?:boolean;
readOnly?:boolean;
observer?:string;
computed?:string;
value?: boolean | number | string | Function;
reflectToAttribute?: boolean;
readOnly?: boolean;
notify?: boolean;
computed?: string;
observer?: string;
}
interface Base {
/** Need to allow all properties for callback methods. */
[prop: string]: any;
/* polymer-micro */
+387 -372
View File
@@ -5,163 +5,178 @@
interface DoneCallbackObject {
/**
* The number of failed assertions
*/
failed: number;
/**
* The number of failed assertions
*/
failed: number;
/**
* The number of passed assertions
*/
passed: number;
/**
* The number of passed assertions
*/
passed: number;
/**
* The total number of assertions
*/
total: number;
/**
* The total number of assertions
*/
total: number;
/**
* The time in milliseconds it took tests to run from start to finish.
*/
runtime: number;
/**
* The time in milliseconds it took tests to run from start to finish.
*/
runtime: number;
}
interface LogCallbackObject {
/**
* The boolean result of an assertion, true means passed, false means failed.
*/
result: boolean;
/**
* The boolean result of an assertion, true means passed, false means failed.
*/
result: boolean;
/**
* One side of a comparision assertion. Can be undefined when ok() is used.
*/
actual: Object;
/**
* One side of a comparision assertion. Can be undefined when ok() is used.
*/
actual: Object;
/**
* One side of a comparision assertion. Can be undefined when ok() is used.
*/
expected: Object;
/**
* One side of a comparision assertion. Can be undefined when ok() is used.
*/
expected: Object;
/**
* A string description provided by the assertion.
*/
message: string;
/**
* A string description provided by the assertion.
*/
message: string;
/**
* The associated stacktrace, either from an exception or pointing to the source
* of the assertion. Depends on browser support for providing stacktraces, so can be
* undefined.
*/
source: string;
/**
* The associated stacktrace, either from an exception or pointing to the source
* of the assertion. Depends on browser support for providing stacktraces, so can be
* undefined.
*/
source: string;
}
interface ModuleStartCallbackObject {
/**
* Name of the next module to run
*/
name: string;
/**
* Name of the next module to run
*/
name: string;
}
interface ModuleDoneCallbackObject {
/**
* Name of this module
*/
name: string;
/**
* Name of this module
*/
name: string;
/**
* The number of failed assertions
*/
failed: number;
/**
* The number of failed assertions
*/
failed: number;
/**
* The number of passed assertions
*/
passed: number;
/**
* The number of passed assertions
*/
passed: number;
/**
* The total number of assertions
*/
total: number;
/**
* The total number of assertions
*/
total: number;
}
interface TestDoneCallbackObject {
/**
* TName of the next test to run
*/
name: string;
/**
* TName of the next test to run
*/
name: string;
/**
* Name of the current module
*/
module: string;
/**
* Name of the current module
*/
module: string;
/**
* The number of failed assertions
*/
failed: number;
/**
* The number of failed assertions
*/
failed: number;
/**
* The number of passed assertions
*/
passed: number;
/**
* The number of passed assertions
*/
passed: number;
/**
* The total number of assertions
*/
total: number;
/**
* The total number of assertions
*/
total: number;
/**
* The total runtime, including setup and teardown
*/
duration: number;
/**
* The total runtime, including setup and teardown
*/
duration: number;
}
interface TestStartCallbackObject {
/**
* Name of the next test to run
*/
name: string;
/**
* Name of the next test to run
*/
name: string;
/**
* Name of the current module
*/
module: string;
/**
* Name of the current module
*/
module: string;
}
interface Config {
altertitle: boolean;
autostart: boolean;
current: Object;
reorder: boolean;
requireExpects: boolean;
testTimeout: number;
urlConfig: Array<URLConfigItem>;
done: any;
altertitle: boolean;
autostart: boolean;
current: Object;
reorder: boolean;
requireExpects: boolean;
testTimeout: number;
urlConfig: Array<URLConfigItem>;
done: any;
}
interface URLConfigItem {
id: string;
label: string;
tooltip: string;
id: string;
label: string;
tooltip: string;
}
interface LifecycleObject {
/**
* Runs before each test
*/
setup?: () => any;
/**
* Runs before each test
* @deprecated
*/
setup?: () => void;
/**
* Runs after each test
*/
teardown?: () => any;
/**
* Runs after each test
* @deprecated
*/
teardown?: () => void;
/**
* Runs before each test
*/
beforeEach?: () => void;
/**
* Runs after each test
*/
afterEach?: () => void;
/**
* Any additional properties on the hooks object will be added to that context.
*/
[property: string]: any;
}
interface QUnitAssert {
/* ASSERT */
assert: any;
current_testEnvironment: any;
jsDump: any;
/* ASSERT */
assert: any;
current_testEnvironment: any;
jsDump: any;
/**
* Instruct QUnit to wait for an asynchronous operation.
@@ -172,32 +187,32 @@ interface QUnitAssert {
*/
async(): () => void;
/**
* A deep recursive comparison assertion, working on primitive types, arrays, objects,
* regular expressions, dates and functions.
*
* The deepEqual() assertion can be used just like equal() when comparing the value of
* objects, such that { key: value } is equal to { key: value }. For non-scalar values,
* identity will be disregarded by deepEqual.
*
* @param actual Object or Expression being tested
* @param expected Known comparison value
* @param message A short description of the assertion
*/
deepEqual(actual: any, expected: any, message?: string): any;
/**
* A deep recursive comparison assertion, working on primitive types, arrays, objects,
* regular expressions, dates and functions.
*
* The deepEqual() assertion can be used just like equal() when comparing the value of
* objects, such that { key: value } is equal to { key: value }. For non-scalar values,
* identity will be disregarded by deepEqual.
*
* @param actual Object or Expression being tested
* @param expected Known comparison value
* @param message A short description of the assertion
*/
deepEqual(actual: any, expected: any, message?: string): any;
/**
* A non-strict comparison assertion, roughly equivalent to JUnit assertEquals.
*
* The equal assertion uses the simple comparison operator (==) to compare the actual
* and expected arguments. When they are equal, the assertion passes: any; otherwise, it fails.
* When it fails, both actual and expected values are displayed in the test result,
* in addition to a given message.
*
* @param actual Expression being tested
* @param expected Known comparison value
* @param message A short description of the assertion
*/
/**
* A non-strict comparison assertion, roughly equivalent to JUnit assertEquals.
*
* The equal assertion uses the simple comparison operator (==) to compare the actual
* and expected arguments. When they are equal, the assertion passes: any; otherwise, it fails.
* When it fails, both actual and expected values are displayed in the test result,
* in addition to a given message.
*
* @param actual Expression being tested
* @param expected Known comparison value
* @param message A short description of the assertion
*/
equal(actual: any, expected: any, message?: string): any;
/**
@@ -211,94 +226,94 @@ interface QUnitAssert {
*/
expect(amount: number): any;
/**
* An inverted deep recursive comparison assertion, working on primitive types,
* arrays, objects, regular expressions, dates and functions.
*
* The notDeepEqual() assertion can be used just like equal() when comparing the
* value of objects, such that { key: value } is equal to { key: value }. For non-scalar
* values, identity will be disregarded by notDeepEqual.
*
* @param actual Object or Expression being tested
* @param expected Known comparison value
* @param message A short description of the assertion
*/
notDeepEqual(actual: any, expected: any, message?: string): any;
/**
* An inverted deep recursive comparison assertion, working on primitive types,
* arrays, objects, regular expressions, dates and functions.
*
* The notDeepEqual() assertion can be used just like equal() when comparing the
* value of objects, such that { key: value } is equal to { key: value }. For non-scalar
* values, identity will be disregarded by notDeepEqual.
*
* @param actual Object or Expression being tested
* @param expected Known comparison value
* @param message A short description of the assertion
*/
notDeepEqual(actual: any, expected: any, message?: string): any;
/**
* A non-strict comparison assertion, checking for inequality.
*
* The notEqual assertion uses the simple inverted comparison operator (!=) to compare
* the actual and expected arguments. When they aren't equal, the assertion passes: any;
* otherwise, it fails. When it fails, both actual and expected values are displayed
* in the test result, in addition to a given message.
*
* @param actual Expression being tested
* @param expected Known comparison value
* @param message A short description of the assertion
*/
notEqual(actual: any, expected: any, message?: string): any;
/**
* A non-strict comparison assertion, checking for inequality.
*
* The notEqual assertion uses the simple inverted comparison operator (!=) to compare
* the actual and expected arguments. When they aren't equal, the assertion passes: any;
* otherwise, it fails. When it fails, both actual and expected values are displayed
* in the test result, in addition to a given message.
*
* @param actual Expression being tested
* @param expected Known comparison value
* @param message A short description of the assertion
*/
notEqual(actual: any, expected: any, message?: string): any;
notPropEqual(actual: any, expected: any, message?: string): any;
notPropEqual(actual: any, expected: any, message?: string): any;
propEqual(actual: any, expected: any, message?: string): any;
propEqual(actual: any, expected: any, message?: string): any;
/**
* A non-strict comparison assertion, checking for inequality.
*
* The notStrictEqual assertion uses the strict inverted comparison operator (!==)
* to compare the actual and expected arguments. When they aren't equal, the assertion
* passes: any; otherwise, it fails. When it fails, both actual and expected values are
* displayed in the test result, in addition to a given message.
*
* @param actual Expression being tested
* @param expected Known comparison value
* @param message A short description of the assertion
*/
notStrictEqual(actual: any, expected: any, message?: string): any;
/**
* A non-strict comparison assertion, checking for inequality.
*
* The notStrictEqual assertion uses the strict inverted comparison operator (!==)
* to compare the actual and expected arguments. When they aren't equal, the assertion
* passes: any; otherwise, it fails. When it fails, both actual and expected values are
* displayed in the test result, in addition to a given message.
*
* @param actual Expression being tested
* @param expected Known comparison value
* @param message A short description of the assertion
*/
notStrictEqual(actual: any, expected: any, message?: string): any;
/**
* A boolean assertion, equivalent to CommonJSs assert.ok() and JUnits assertTrue().
* Passes if the first argument is truthy.
*
* The most basic assertion in QUnit, ok() requires just one argument. If the argument
* evaluates to true, the assertion passes; otherwise, it fails. If a second message
* argument is provided, it will be displayed in place of the result.
*
* @param state Expression being tested
* @param message A short description of the assertion
*/
ok(state: any, message?: string): any;
/**
* A boolean assertion, equivalent to CommonJSs assert.ok() and JUnits assertTrue().
* Passes if the first argument is truthy.
*
* The most basic assertion in QUnit, ok() requires just one argument. If the argument
* evaluates to true, the assertion passes; otherwise, it fails. If a second message
* argument is provided, it will be displayed in place of the result.
*
* @param state Expression being tested
* @param message A short description of the assertion
*/
ok(state: any, message?: string): any;
/**
* A strict type and value comparison assertion.
*
* The strictEqual() assertion provides the most rigid comparison of type and value with
* the strict equality operator (===)
*
* @param actual Expression being tested
* @param expected Known comparison value
* @param message A short description of the assertion
*/
strictEqual(actual: any, expected: any, message?: string): any;
/**
* A strict type and value comparison assertion.
*
* The strictEqual() assertion provides the most rigid comparison of type and value with
* the strict equality operator (===)
*
* @param actual Expression being tested
* @param expected Known comparison value
* @param message A short description of the assertion
*/
strictEqual(actual: any, expected: any, message?: string): any;
/**
* Assertion to test if a callback throws an exception when run.
*
* When testing code that is expected to throw an exception based on a specific set of
* circumstances, use throws() to catch the error object for testing and comparison.
*
* @param block Function to execute
* @param expected Error Object to compare
* @param message A short description of the assertion
*/
throws(block: () => any, expected: any, message?: string): any;
/**
* Assertion to test if a callback throws an exception when run.
*
* When testing code that is expected to throw an exception based on a specific set of
* circumstances, use throws() to catch the error object for testing and comparison.
*
* @param block Function to execute
* @param expected Error Object to compare
* @param message A short description of the assertion
*/
throws(block: () => any, expected: any, message?: string): any;
/**
* @param block Function to execute
* @param message A short description of the assertion
*/
throws(block: () => any, message?: string): any;
/**
* @param block Function to execute
* @param message A short description of the assertion
*/
throws(block: () => any, message?: string): any;
/**
* Alias of throws.
@@ -326,177 +341,177 @@ interface QUnitAssert {
raises(block: () => any, message?: string): any;
}
interface QUnitStatic extends QUnitAssert {
/* ASYNC CONTROL */
interface QUnitStatic extends QUnitAssert {
/* ASYNC CONTROL */
/**
* Start running tests again after the testrunner was stopped. See stop().
*
* When your async test has multiple exit points, call start() for the corresponding number of stop() increments.
*
* @param decrement Optional argument to merge multiple start() calls into one. Use with multiple corrsponding stop() calls.
*/
start(decrement?: number): any;
/**
* Start running tests again after the testrunner was stopped. See stop().
*
* When your async test has multiple exit points, call start() for the corresponding number of stop() increments.
*
* @param decrement Optional argument to merge multiple start() calls into one. Use with multiple corrsponding stop() calls.
*/
start(decrement?: number): any;
/**
* Stop the testrunner to wait for async tests to run. Call start() to continue.
*
* When your async test has multiple exit points, call stop() with the increment argument, corresponding to the number of start() calls you need.
*
* On Blackberry 5.0, window.stop is a native read-only function. If you deal with that browser, use QUnit.stop() instead, which will work anywhere.
*
* @param decrement Optional argument to merge multiple stop() calls into one. Use with multiple corrsponding start() calls.
*/
stop(increment? : number): any;
/* CALLBACKS */
/**
* Stop the testrunner to wait for async tests to run. Call start() to continue.
*
* When your async test has multiple exit points, call stop() with the increment argument, corresponding to the number of start() calls you need.
*
* On Blackberry 5.0, window.stop is a native read-only function. If you deal with that browser, use QUnit.stop() instead, which will work anywhere.
*
* @param decrement Optional argument to merge multiple stop() calls into one. Use with multiple corrsponding start() calls.
*/
stop(increment? : number): any;
/* CALLBACKS */
/**
* Register a callback to fire whenever the test suite begins.
*
* QUnit.begin() is called once before running any tests. (a better would've been QUnit.start,
* but thats already in use elsewhere and can't be changed.)
*
* @param callback Callback to execute
*/
begin(callback: () => any): any;
/**
* Register a callback to fire whenever the test suite begins.
*
* QUnit.begin() is called once before running any tests. (a better would've been QUnit.start,
* but thats already in use elsewhere and can't be changed.)
*
* @param callback Callback to execute
*/
begin(callback: () => any): any;
/**
* Register a callback to fire whenever the test suite ends.
*
* @param callback Callback to execute.
*/
done(callback: (details: DoneCallbackObject) => any): any;
/**
* Register a callback to fire whenever the test suite ends.
*
* @param callback Callback to execute.
*/
done(callback: (details: DoneCallbackObject) => any): any;
/**
* Register a callback to fire whenever an assertion completes.
*
* This is one of several callbacks QUnit provides. Its intended for integration scenarios like
* PhantomJS or Jenkins. The properties of the details argument are listed below as options.
*
* @param callback Callback to execute.
*/
log(callback: (details: LogCallbackObject) => any): any;
/**
* Register a callback to fire whenever an assertion completes.
*
* This is one of several callbacks QUnit provides. Its intended for integration scenarios like
* PhantomJS or Jenkins. The properties of the details argument are listed below as options.
*
* @param callback Callback to execute.
*/
log(callback: (details: LogCallbackObject) => any): any;
/**
* Register a callback to fire whenever a module ends.
*
* @param callback Callback to execute.
*/
moduleDone(callback: (details: ModuleDoneCallbackObject) => any): any;
/**
* Register a callback to fire whenever a module ends.
*
* @param callback Callback to execute.
*/
moduleDone(callback: (details: ModuleDoneCallbackObject) => any): any;
/**
* Register a callback to fire whenever a module begins.
*
* @param callback Callback to execute.
*/
moduleStart(callback: (details: ModuleStartCallbackObject) => any): any;
/**
* Register a callback to fire whenever a module begins.
*
* @param callback Callback to execute.
*/
moduleStart(callback: (details: ModuleStartCallbackObject) => any): any;
/**
* Register a callback to fire whenever a test ends.
*
* @param callback Callback to execute.
*/
testDone(callback: (details: TestDoneCallbackObject) => any): any;
/**
* Register a callback to fire whenever a test ends.
*
* @param callback Callback to execute.
*/
testDone(callback: (details: TestDoneCallbackObject) => any): any;
/**
* Register a callback to fire whenever a test begins.
*
* @param callback Callback to execute.
*/
testStart(callback: (details: TestStartCallbackObject) => any): any;
/* CONFIGURATION */
/**
* Register a callback to fire whenever a test begins.
*
* @param callback Callback to execute.
*/
testStart(callback: (details: TestStartCallbackObject) => any): any;
/* CONFIGURATION */
/**
* QUnit has a bunch of internal configuration defaults, some of which are
* useful to override. Check the description for each option for details.
*/
config: Config;
/* TEST */
/**
* QUnit has a bunch of internal configuration defaults, some of which are
* useful to override. Check the description for each option for details.
*/
config: Config;
/* TEST */
/**
* Add an asynchronous test to run. The test must include a call to start().
*
* For testing asynchronous code, asyncTest will automatically stop the test runner
* and wait for your code to call start() to continue.
*
* @param name Title of unit being tested
* @param expected Number of assertions in this test
* @param test Function to close over assertions
*/
asyncTest(name: string, expected: number, test: (assert: QUnitAssert) => any): any;
/**
* Add an asynchronous test to run. The test must include a call to start().
*
* For testing asynchronous code, asyncTest will automatically stop the test runner
* and wait for your code to call start() to continue.
*
* @param name Title of unit being tested
* @param expected Number of assertions in this test
* @param test Function to close over assertions
*/
asyncTest(name: string, expected: number, test: (assert: QUnitAssert) => any): any;
/**
* Add an asynchronous test to run. The test must include a call to start().
*
* For testing asynchronous code, asyncTest will automatically stop the test runner
* and wait for your code to call start() to continue.
*
* @param name Title of unit being tested
* @param test Function to close over assertions
*/
asyncTest(name: string, test: (assert: QUnitAssert) => any): any;
/**
* Add an asynchronous test to run. The test must include a call to start().
*
* For testing asynchronous code, asyncTest will automatically stop the test runner
* and wait for your code to call start() to continue.
*
* @param name Title of unit being tested
* @param test Function to close over assertions
*/
asyncTest(name: string, test: (assert: QUnitAssert) => any): any;
/**
* Specify how many assertions are expected to run within a test.
*
* To ensure that an explicit number of assertions are run within any test, use
* expect( number ) to register an expected count. If the number of assertions
* run does not match the expected count, the test will fail.
*
* @param amount Number of assertions in this test.
* @depricated since version 1.16
*/
expect(amount: number): any;
/**
* Specify how many assertions are expected to run within a test.
*
* To ensure that an explicit number of assertions are run within any test, use
* expect( number ) to register an expected count. If the number of assertions
* run does not match the expected count, the test will fail.
*
* @param amount Number of assertions in this test.
* @depricated since version 1.16
*/
expect(amount: number): any;
/**
* Group related tests under a single label.
*
* All tests that occur after a call to module() will be grouped into that module.
* The test names will all be preceded by the module name in the test results.
* You can then use that module name to select tests to run.
*
* @param name Label for this group of tests
* @param lifecycle Callbacks to run before and after each test
*/
module(name: string, lifecycle?: LifecycleObject): any;
/**
* Group related tests under a single label.
*
* All tests that occur after a call to module() will be grouped into that module.
* The test names will all be preceded by the module name in the test results.
* You can then use that module name to select tests to run.
*
* @param name Label for this group of tests
* @param lifecycle Callbacks to run before and after each test
*/
module(name: string, lifecycle?: LifecycleObject): any;
/**
* Add a test to run.
*
* When testing the most common, synchronous code, use test().
* The assert argument to the callback contains all of QUnit's assertion methods.
* If you are avoiding using any of QUnit's globals, you can use the assert
* argument instead.
*
* @param title Title of unit being tested
* @param expected Number of assertions in this test
* @param test Function to close over assertions
*/
test(title: string, expected: number, test: (assert: QUnitAssert) => any): any;
/**
* Add a test to run.
*
* When testing the most common, synchronous code, use test().
* The assert argument to the callback contains all of QUnit's assertion methods.
* If you are avoiding using any of QUnit's globals, you can use the assert
* argument instead.
*
* @param title Title of unit being tested
* @param expected Number of assertions in this test
* @param test Function to close over assertions
*/
test(title: string, expected: number, test: (assert: QUnitAssert) => any): any;
/**
* @param title Title of unit being tested
* @param test Function to close over assertions
*/
test(title: string, test: (assert: QUnitAssert) => any): any;
/**
* @param title Title of unit being tested
* @param test Function to close over assertions
*/
test(title: string, test: (assert: QUnitAssert) => any): any;
/**
* https://github.com/jquery/qunit/blob/master/qunit/qunit.js#L1568
*/
equiv(a: any, b: any): any;
/**
* https://github.com/jquery/qunit/blob/master/qunit/qunit.js#L1568
*/
equiv(a: any, b: any): any;
/**
* https://github.com/jquery/qunit/blob/master/qunit/qunit.js#L897
*/
push(result: any, actual: any, expected: any, message: string): any;
/**
* https://github.com/jquery/qunit/blob/master/qunit/qunit.js#L897
*/
push(result: any, actual: any, expected: any, message: string): any;
/**
* https://github.com/jquery/qunit/blob/master/qunit/qunit.js#L839
*/
reset(): any;
/**
* https://github.com/jquery/qunit/blob/master/qunit/qunit.js#L839
*/
reset(): any;
}
/* ASSERT */
@@ -635,7 +650,7 @@ declare function start(decrement?: number): any;
* @param decrement Optional argument to merge multiple stop() calls into one. Use with multiple corrsponding start() calls.
*/
declare function stop(increment? : number): any;
/* CALLBACKS */
/**
@@ -692,7 +707,7 @@ declare function testDone(callback: (details: TestDoneCallbackObject) => any): a
* @param callback Callback to execute.
*/
declare function testStart(callback: (details: TestStartCallbackObject) => any): any;
/* TEST */
/**
+7
View File
@@ -183,6 +183,13 @@ declare module Selectize {
*/
valueField?: string;
/**
* Option groups that options will be bucketed into.
* If your element is a <select> with <optgroup>s this property gets populated automatically.
* Make sure each object in the array has a property named whatever "optgroupValueField" is set to.
*/
optgroups?: U[];
/**
* The name of the option group property that serves as its unique identifier.
*
-4
View File
@@ -4,8 +4,6 @@
var peerByOption: PeerJs.Peer = new Peer({
key: 'peerKey',
debug: 3,
logFunction: ()=>{
}
});
peerByOption.listAllPeers(function(items){
@@ -21,8 +19,6 @@ var peerByIdAndOption: PeerJs.Peer = new Peer(
{
key: 'peerKey',
debug: 3,
logFunction: ()=>{
}
});
var id = peerByOption.id;
+1 -1
View File
@@ -77,7 +77,7 @@ declare module PeerJs{
* @param id The brokering ID of the remote peer (their peer.id).
* @param options for specifying details about Peer Connection
*/
connect(id: string, options?: PeerJs.PeerJSOption): PeerJs.DataConnection;
connect(id: string, options?: PeerJs.PeerConnectOption): PeerJs.DataConnection;
/**
* Connects to the remote peer specified by id and returns a data connection.
* @param id The brokering ID of the remote peer (their peer.id).
@@ -16,7 +16,7 @@ var config: tedious.ConnectionConfig = {
server: "127.0.0.1",
options: {
database: "somedb",
instance: "someinstance"
instanceName: "someinstance"
}
};
@@ -42,7 +42,7 @@
}
var sprite = new THREE.Sprite(new THREE.SpriteCanvasMaterial({ color: 0xff0040, program: program }));
var sprite = new THREE.Sprite(new THREE.SpriteCanvasMaterial({ color: 0xff0040, program: program }));
light1.add(sprite);
var sprite = new THREE.Sprite(new THREE.SpriteCanvasMaterial({ color: 0x0040ff, program: program }));
+2 -2
View File
@@ -107,7 +107,7 @@
clothTexture.wrapS = clothTexture.wrapT = THREE.RepeatWrapping;
clothTexture.anisotropy = 16;
var clothMaterial = new THREE.MeshPhongMaterial({ alphaTest: 0.5, ambient: 0xffffff, color: 0xffffff, specular: 0x030303, emissive: 0x111111, shiness: 10, map: clothTexture, side: THREE.DoubleSide });
var clothMaterial = new THREE.MeshPhongMaterial({ alphaTest: 0.5, color: 0xffffff, specular: 0x030303, emissive: 0x111111, shininess: 10, map: clothTexture, side: THREE.DoubleSide });
// cloth geometry
clothGeometry = new THREE.ParametricGeometry(clothFunction, cloth.w, cloth.h);
@@ -162,7 +162,7 @@
// poles
var poleGeo = new THREE.BoxGeometry(5, 375, 5);
var poleMat = new THREE.MeshPhongMaterial({ color: 0xffffff, specular: 0x111111, shiness: 100 });
var poleMat = new THREE.MeshPhongMaterial({ color: 0xffffff, specular: 0x111111, shininess: 100 });
var mesh = new THREE.Mesh(poleGeo, poleMat);
mesh.position.x = -125;
+1 -1
View File
@@ -184,7 +184,7 @@
geometry.computeBoundingSphere();
var material = new THREE.MeshPhongMaterial({
color: 0xaaaaaa, ambient: 0xaaaaaa, specular: 0xffffff, shininess: 250,
color: 0xaaaaaa, specular: 0xffffff, shininess: 250,
side: THREE.DoubleSide, vertexColors: THREE.VertexColors
});
+1 -1
View File
@@ -35,7 +35,7 @@
map.wrapS = map.wrapT = THREE.RepeatWrapping;
map.anisotropy = 16;
var material = new THREE.MeshLambertMaterial({ ambient: 0xbbbbbb, map: map, side: THREE.DoubleSide });
var material = new THREE.MeshLambertMaterial({ map: map, side: THREE.DoubleSide });
//
+1 -1
View File
@@ -48,7 +48,7 @@
var s = 250;
var cube = new THREE.BoxGeometry(s, s, s);
var material = new THREE.MeshPhongMaterial({ ambient: 0x333333, color: 0xffffff, specular: 0xffffff, shininess: 50 });
var material = new THREE.MeshPhongMaterial({ color: 0xffffff, specular: 0xffffff, shininess: 50 });
for (var i = 0; i < 3000; i++) {
@@ -80,7 +80,7 @@
// GROUND
var groundGeo = new THREE.PlaneBufferGeometry(10000, 10000);
var groundMat = new THREE.MeshPhongMaterial({ ambient: 0xffffff, color: 0xffffff, specular: 0x050505 });
var groundMat = new THREE.MeshPhongMaterial({ color: 0xffffff, specular: 0x050505 });
groundMat.color.setHSL(0.095, 1, 0.75);
var ground = new THREE.Mesh(groundGeo, groundMat);
+4 -4
View File
@@ -55,20 +55,20 @@
materials.push(new THREE.MeshLambertMaterial({ map: texture, transparent: true }));
materials.push(new THREE.MeshLambertMaterial({ color: 0xdddddd, shading: THREE.FlatShading }));
materials.push(new THREE.MeshPhongMaterial({ ambient: 0x030303, color: 0xdddddd, specular: 0x009900, shininess: 30, shading: THREE.FlatShading }));
materials.push(new THREE.MeshPhongMaterial({ color: 0xdddddd, specular: 0x009900, shininess: 30, shading: THREE.FlatShading }));
materials.push(new THREE.MeshNormalMaterial());
materials.push(new THREE.MeshBasicMaterial({ color: 0xffaa00, transparent: true, blending: THREE.AdditiveBlending }));
//materials.push( new THREE.MeshBasicMaterial( { color: 0xff0000, blending: THREE.SubtractiveBlending } ) );
materials.push(new THREE.MeshLambertMaterial({ color: 0xdddddd, shading: THREE.SmoothShading }));
materials.push(new THREE.MeshPhongMaterial({ ambient: 0x030303, color: 0xdddddd, specular: 0x009900, shininess: 30, shading: THREE.SmoothShading, map: texture, transparent: true }));
materials.push(new THREE.MeshPhongMaterial({ color: 0xdddddd, specular: 0x009900, shininess: 30, shading: THREE.SmoothShading, map: texture, transparent: true }));
materials.push(new THREE.MeshNormalMaterial({ shading: THREE.SmoothShading }));
materials.push(new THREE.MeshBasicMaterial({ color: 0xffaa00, wireframe: true }));
materials.push(new THREE.MeshDepthMaterial());
materials.push(new THREE.MeshLambertMaterial({ color: 0x666666, emissive: 0xff0000, ambient: 0x000000, shading: THREE.SmoothShading }));
materials.push(new THREE.MeshPhongMaterial({ color: 0x000000, specular: 0x666666, emissive: 0xff0000, ambient: 0x000000, shininess: 10, shading: THREE.SmoothShading, opacity: 0.9, transparent: true }));
materials.push(new THREE.MeshLambertMaterial({ color: 0x666666, emissive: 0xff0000, shading: THREE.SmoothShading }));
materials.push(new THREE.MeshPhongMaterial({ color: 0x000000, specular: 0x666666, emissive: 0xff0000, shininess: 10, shading: THREE.SmoothShading, opacity: 0.9, transparent: true }));
materials.push(new THREE.MeshBasicMaterial({ map: texture, transparent: true }));
+1 -1
View File
@@ -8,7 +8,7 @@
declare module THREE {
export interface SpriteCanvasMaterialParameters extends MaterialParameters{
color?: number;
program?: (context: any, color: Color) => void;
}
export class SpriteCanvasMaterial extends Material {
+60 -16
View File
@@ -2234,8 +2234,35 @@ declare module THREE {
}
export interface MeshNormalMaterialParameters extends MaterialParameters{
/** Line color in hexadecimal. Default is 0xffffff. */
color?: number;
/** Sets the texture map. Default is null */
map?: Texture;
/** Set light map. Default is null. */
lightMap?: Texture;
/** Set specular map. Default is null. */
specularMap?: Texture;
/** Set alpha map. Default is null. */
alphaMap?: Texture;
/** Set env map. Default is null. */
envMap?: Texture;
/** Define whether the material color is affected by global fog settings. Default is false. */
fog?: boolean;
/** How the triangles of a curved surface are rendered. Default is THREE.SmoothShading. */
shading?: Shading;
/** Render geometry as wireframe. Default is false (i.e. render as smooth shaded). */
wireframe?: boolean;
/** Controls wireframe thickness. Default is 1. */
wireframeLinewidth?: number;
/** Define appearance of line ends. Default is 'round'. */
wireframeLinecap?: string;
/** Define appearance of line joints. Default is 'round'. */
wireframeLinejoin?: string;
/** Define how the vertices gets colored. Default is THREE.NoColors. */
vertexColors?: Colors;
/** Define whether the material uses skinning. Default is false. */
skinning?: boolean;
/** Define whether the material uses morphTargets. Default is false. */
morphTargets?: boolean;
}
@@ -2249,35 +2276,52 @@ declare module THREE {
clone(): MeshNormalMaterial;
}
export interface MeshPhongMaterialParameters extends MaterialParameters{
color?: number; // diffuse
export interface MeshPhongMaterialParameters extends MaterialParameters {
/** geometry color in hexadecimal. Default is 0xffffff. */
color?: number;
/** Sets the texture map. Default is null */
map?: Texture;
/** Set light map. Default is null */
lightMap?: Texture;
/** Set specular map. Default is null */
specularMap?: Texture;
/** Set alpha map. Default is null */
alphaMap?: Texture;
/** Set env map. Default is null */
envMap?: Texture;
/** Define whether the material color is affected by global fog settings. Default is true */
fog?: boolean;
/** Define shading type. Default is THREE.SmoothShading */
shading?: Shading;
/** render geometry as wireframe. Default is false */
wireframe?: string;
/** Line thickness. Default is 1. */
wireframeLinewidth?: number;
/** Define appearance of line ends. Default is 'round' */
wireframeLinecap?: string;
/** Define appearance of line joints. Default is 'round'. */
wireframeLinejoin?: string;
/** Define how the vertices gets colored. Default is THREE.NoColors. */
vertexColors?: Colors;
/** Define whether the material uses skinning. Default is false. */
skinning?: boolean;
/** Define whether the material uses morphTargets. Default is false. */
morphTargets?: boolean;
emissive?: number;
specular?: number;
shininess?: number;
metal?: boolean;
wrapAround?: boolean;
wrapRGB?: Vector3;
map?: Texture;
lightMap?: Texture;
bumpMap?: Texture;
bumpScale?: number;
normalMap?: Texture;
normalScale?: Vector2;
specularMap?: Texture;
alphaMap?: Texture;
envMap?: Texture;
combine?: Combine;
reflectivity?: number;
refractionRatio?: number;
fog?: boolean;
shading?: Shading;
wireframe?: boolean;
wireframeLinewidth?: number;
wireframeLinecap?: string;
wireframeLinejoin?: string;
vertexColors?: Colors;
skinning?: boolean;
morphTargets?: boolean;
morphNormals?: boolean;
}
+1972 -1998
View File
File diff suppressed because it is too large Load Diff
+88 -29
View File
@@ -3,7 +3,7 @@
// Definitions by: Tom Crockett <http://github.com/pelotom>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module Vega {
declare namespace Vega {
export interface Parse {
spec(url: string, callback: (chart: (args: ViewArgs) => View) => void): void;
@@ -113,7 +113,7 @@ declare module Vega {
reset(): Model;
}
export module Runtime {
export namespace Runtime {
export interface DataSets {
[name: string]: Datum[];
}
@@ -132,19 +132,6 @@ declare module Vega {
marks: Mark[];
}
export interface Mark {
// Stuff from Spec.Mark
type: string;
name?: string;
description?: string;
from?: Mark.From;
key?: string;
delay?: Properties;
// Runtime PropertySets
properties?: PropertySets;
}
export interface PropertySets {
enter?: Properties;
exit?: Properties;
@@ -158,7 +145,7 @@ declare module Vega {
}
export interface Node {
def: Runtime.Mark;
def: Vega.Mark;
marktype: string;
interactive: boolean;
items: Node[];
@@ -220,7 +207,9 @@ declare module Vega {
* in some cases strict padding is not possible; for example, if the axis
* labels are much larger than the data rectangle.
*/
padding?: any;
padding?: number | string | {
top: number; left: number; right: number; bottom: number
}; // string is "auto" or "strict"
/**
* Definitions of data to visualize.
*/
@@ -240,7 +229,7 @@ declare module Vega {
/**
* Graphical mark definitions.
*/
marks: Mark[];
marks: (Mark | GroupMark)[];
}
export interface Data {
@@ -278,17 +267,51 @@ declare module Vega {
transform?: Data.Transform[];
}
export module Data {
export interface Format {
export namespace Data {
export interface FormatBase {
/**
* The currently supported format types are json (JavaScript Object
* Notation), csv (comma-separated values), tsv (tab-separated values),
* topojson, and treejson.
*/
type?: string;
type: string;
// TODO: fields for specific formats
}
/**
* The JSON property containing the desired data.
* This parameter can be used when the loaded JSON file may have surrounding structure or meta-data.
* For example "property": "values.features" is equivalent to retrieving json.values.features from the
* loaded JSON object.
*/
export interface JsonFormat extends FormatBase {
type: string; // "json"
property?: string;
}
export interface CsvOrTsvFormat extends FormatBase {
type: string; // "csv" | "tsv"
parse?: {
[propertyName: string]: string; // "number" | "boolean" | "date"
}
}
export interface TopoJsonFormat extends FormatBase {
type: string; // "topojson"
feature?: string;
mesh?: string;
}
export interface TreeJson extends FormatBase {
type: string; // "treejson"
children?: string;
parse?: {
[propertyName: string]: string; // "number" | "boolean" | "date"
}
}
export type Format = JsonFormat | CsvOrTsvFormat | TopoJsonFormat | TreeJson;
export interface Transform {
// TODO
}
@@ -316,7 +339,8 @@ declare module Vega {
// -- Time/Quantitative scale properties
clamp?: boolean;
nice?: any; // boolean for quantitative scales, string for time scales
/** boolean for quantitative scales, string for time scales */
nice?: boolean | string;
// -- Quantitative scale properties
exponent?: number;
@@ -345,9 +369,9 @@ declare module Vega {
properties?: Axis.Properties
}
export module Axis {
export namespace Axis {
export interface Properties {
majorTicks?: PropertySet;
ticks?: PropertySet;
minorTicks?: PropertySet;
grid?: PropertySet;
labels?: PropertySet;
@@ -362,24 +386,59 @@ declare module Vega {
export interface Mark {
// TODO docs
type: string;
// Stuff from Spec.Mark
type: string; // "rect" | "symbol" | "path" | "arc" | "area" | "line" | "rule" | "image" | "text" | "group"
name?: string;
description?: string;
from?: Mark.From;
properties?: PropertySets;
key?: string;
delay?: ValueRef;
scales?: Scale[];
/**
* "linear-in" | "linear-out" | "linear-in-out" | "linear-out-in" | "quad-in" | "quad-out" | "quad-in-out" |
* "quad-out-in" | "cubic-in" | "cubic-out" | "cubic-in-out" | "cubic-out-in" | "sin-in" | "sin-out" | "sin-in-out" |
* "sin-out-in" | "exp-in" | "exp-out" | "exp-in-out" | "exp-out-in" | "circle-in" | "circle-out" | "circle-in-out" |
* "circle-out-in" | "bounce-in" | "bounce-out" | "bounce-in-out" | "bounce-out-in"
*/
ease?: string;
interactive?: boolean;
// Runtime PropertySets
properties?: PropertySets;
}
export module Mark {
export interface From {
// TODO docs
data?: string;
mark?: string;
transform?: Data.Transform[];
}
}
export interface GroupMark extends Mark {
type: string; // "group"
/**
* Scale transform definitions.
*/
scales?: Scale[];
/**
* Axis definitions.
*/
axes?: Axis[];
/**
* Legend definitions.
*/
legends?: Legend[];
/**
* Groups differ from other mark types in their ability to contain children marks.
* Marks defined within a group mark can inherit data from their parent group.
* For inheritance to work each data element for a group must contain data elements of its own.
* This arrangement of nested data is typically achieved by facetting the data, such that each group-level data element includes its own array of sub-elements
*/
marks?: (Mark | GroupMark)[];
}
export interface PropertySets {
// TODO docs
enter?: PropertySet;
@@ -454,9 +513,9 @@ declare module Vega {
}
}
declare module vg {
declare namespace vg {
export var parse: Vega.Parse;
export module scene {
export namespace scene {
export function item(mark: Vega.Node): Vega.Node;
}
+1 -1
View File
@@ -32,7 +32,7 @@ var gracenote = new Vex.Flow.GraceNote({keys: ["e/5"], duration: "16", slash: tr
notes1[2].addModifier(0, new Vex.Flow.GraceNoteGroup([gracenote], true).beamNotes());
// Color the chord
notes1[3].setStyle({fillStyle: "blue", strokeStyle: "blue", stemStyle: "blue"});
notes1[3].setStyle({fillStyle: "blue", strokeStyle: "blue"});
// Create a voice in 4/4 and add notes
var voice1 = new Vex.Flow.Voice({
+128 -128
View File
@@ -6,7 +6,7 @@
//inconsistent namespace: this is a helper funtion from tables.js and should not pollute the global namespace!
declare function sanitizeDuration(duration : string) : string;
declare module Vex {
declare namespace Vex {
function L(block : string, args : any[]) : void;
function Merge<T extends Object>(destination : T, source : Object) : T;
@@ -90,7 +90,7 @@ declare module Vex {
original_font_information? : {postscript_name : string, version_string : string, vendor_url : string, full_font_name : string, font_family_name : string, copyright : string, description : string, trademark : string, designer : string, designer_url : string, unique_font_identifier : string, license_url : string, license_description : string, manufacturer_name : string, font_sub_family_name : string};
}
module Flow {
namespace Flow {
const RESOLUTION : number;
@@ -137,10 +137,6 @@ declare module Vex {
original_font_information : {postscript_name : string, version_string : string, vendor_url : string, full_font_name : string, font_family_name : string, copyright : string, description : string, trademark : string, designer : string, designer_url : string, unique_font_identifier : string, license_url : string, license_description : string, manufacturer_name : string, font_sub_family_name : string};
}
module Accidental {
const CATEGORY : string;
}
class Accidental extends Modifier {
//TODO remove the following lines once TypeScript allows subclass overrides with type changes
setNote(note : Note) : Modifier;
@@ -154,9 +150,7 @@ declare module Vex {
static applyAccidentals(voices : Voice[], keySignature? : string) : void;
}
export module Annotation {
const enum Justify {LEFT, CENTER, RIGHT, CENTER_STEM}
const enum VerticalJustify {TOP, CENTER, BOTTOM, CENTER_STEM}
namespace Accidental {
const CATEGORY : string;
}
@@ -172,7 +166,9 @@ declare module Vex {
draw() : void;
}
module Articulation {
namespace Annotation {
const enum Justify {LEFT, CENTER, RIGHT, CENTER_STEM}
const enum VerticalJustify {TOP, CENTER, BOTTOM, CENTER_STEM}
const CATEGORY : string;
}
@@ -183,6 +179,10 @@ declare module Vex {
draw() : void;
}
namespace Articulation {
const CATEGORY : string;
}
class BarNote extends Note {
static DEBUG : boolean;
getType() : Barline.type;
@@ -193,7 +193,7 @@ declare module Vex {
draw() : void;
}
export module Barline {
namespace Barline {
const enum type {SINGLE, DOUBLE, END, REPEAT_BEGIN, REPEAT_END, REPEAT_BOTH, NONE}
}
@@ -228,10 +228,6 @@ declare module Vex {
static generateBeams(notes : StemmableNote[], config? : {groups? : Fraction[], stem_direction? : number, beam_rests? : boolean, beam_middle_only? : boolean, show_stemlets? : boolean, maintain_stem_directions? : boolean}) : Beam[];
}
module Bend {
const CATEGORY : string;
}
class Bend extends Modifier {
constructor(text : string, release? : boolean, phrase? : {type : number, text : string, width : number}[]);
static UP : number;
@@ -244,6 +240,10 @@ declare module Vex {
draw() : void;
}
namespace Bend {
const CATEGORY : string;
}
class BoundingBox {
constructor(x : number, y : number, w : number, h : number);
static copy(that : BoundingBox) : BoundingBox;
@@ -354,10 +354,6 @@ declare module Vex {
draw() : void;
}
export module Curve {
const enum Position {NEAR_HEAD, NEAR_TOP}
}
class Curve {
constructor(from : Note, to : Note, options? : {spacing? : number, thickness? : number, x_shift? : number, y_shift : number, position : Curve.Position, invert : boolean, cps? : {x : number, y : number}[]});
static DEBUG : boolean;
@@ -368,8 +364,8 @@ declare module Vex {
draw() : boolean;
}
module Dot {
const CATEGORY : string;
namespace Curve {
const enum Position {NEAR_HEAD, NEAR_TOP}
}
class Dot extends Modifier {
@@ -382,6 +378,10 @@ declare module Vex {
draw() : void;
}
namespace Dot {
const CATEGORY : string;
}
class Formatter {
static DEBUG : boolean;
static FormatAndDraw(ctx : IRenderContext, stave : Stave, notes : Note[], params? : {auto_beam : boolean, align_rests : boolean}) : BoundingBox;
@@ -433,10 +433,6 @@ declare module Vex {
parse(str : string) : Fraction;
}
module FretHandFinger {
const CATEGORY : string;
}
class FretHandFinger extends Modifier {
constructor(number : number);
static format(nums : FretHandFinger[], state : {left_shift : number, right_shift : number, text_line : number}) : void;
@@ -452,6 +448,10 @@ declare module Vex {
draw() : void;
}
namespace FretHandFinger {
const CATEGORY : string;
}
class GhostNote extends StemmableNote {
//TODO remove the following lines once TypeScript allows subclass overrides with type changes or type inconsistencies mentioned below are fixed
setStave(stave : Stave) : Note;
@@ -489,10 +489,6 @@ declare module Vex {
draw() : void;
}
module GraceNoteGroup {
const CATEGORY : string;
}
class GraceNoteGroup extends Modifier {
//TODO remove the following lines once TypeScript allows subclass overrides with type changes or type inconsistencies mentioned below are fixed
setWidth(width : number) : Modifier;
@@ -510,6 +506,10 @@ declare module Vex {
draw() : void;
}
namespace GraceNoteGroup {
const CATEGORY : string;
}
class KeyManager {
constructor(key : string);
setKey(key : string) : KeyManager;
@@ -531,11 +531,6 @@ declare module Vex {
convertAccLines(clef : string, type : string) : void;
}
export module Modifier {
const enum Position {LEFT, RIGHT, ABOVE, BELOW}
const CATEGORY : string
}
class Modifier {
static DEBUG : boolean;
getCategory() : string;
@@ -557,6 +552,11 @@ declare module Vex {
draw() : void;
}
namespace Modifier {
const enum Position {LEFT, RIGHT, ABOVE, BELOW}
const CATEGORY : string
}
class ModifierContext {
static DEBUG : boolean;
addModifier(modifier : Modifier) : ModifierContext;
@@ -570,20 +570,6 @@ declare module Vex {
postFormat() : void;
}
module Music {
const NUM_TONES : number;
const roots : string[];
const root_values : number[];
const root_indices : {[root : string] : number};
const canonical_notes : string[];
const diatonic_intervals : string[];
const diatonic_accidentals : {[diatonic_interval : string] : {note : number, accidental : number}};
const intervals : {[interval : string] : number};
const scales : {[scale : string] : number[]};
const accidentals : string[];
const noteValues : {[value : string] : {root_index : number, int_val : number}};
}
class Music {
isValidNoteValue(note : number) : boolean;
isValidIntervalValue(interval : number) : boolean;
@@ -600,8 +586,18 @@ declare module Vex {
createScaleMap(keySignature : string) : {[rootName : string] : string};
}
module Note {
const CATEGORY : string;
namespace Music {
const NUM_TONES : number;
const roots : string[];
const root_values : number[];
const root_indices : {[root : string] : number};
const canonical_notes : string[];
const diatonic_intervals : string[];
const diatonic_accidentals : {[diatonic_interval : string] : {note : number, accidental : number}};
const intervals : {[interval : string] : number};
const scales : {[scale : string] : number[]};
const accidentals : string[];
const noteValues : {[value : string] : {root_index : number, int_val : number}};
}
class Note implements Tickable {
@@ -664,6 +660,10 @@ declare module Vex {
setPreFormatted(value : boolean) : void;
}
namespace Note {
const CATEGORY : string;
}
class NoteHead extends Note {
constructor(head_options : {x? : number, y? : number, note_type? : string, duration : string, displaced? : boolean, stem_direction? : number, line : number, x_shift : number, custom_glyph_code? : string, style? : string, slashed? : boolean, glyph_font_scale? : number});
static DEBUG : boolean;
@@ -687,10 +687,6 @@ declare module Vex {
draw() : void;
}
module Ornament {
const CATEGORY : string;
}
class Ornament extends Modifier {
constructor(type : string);
static DEBUG : boolean;
@@ -701,9 +697,8 @@ declare module Vex {
draw() : void;
}
export module PedalMarking {
const enum Styles {TEXT, BRACKET, MIXED}
const GLYPHS : {[name : string] : {code : string, x_shift : number, y_shift : number}};
namespace Ornament {
const CATEGORY : string;
}
class PedalMarking {
@@ -721,6 +716,11 @@ declare module Vex {
draw() : void;
}
namespace PedalMarking {
const enum Styles {TEXT, BRACKET, MIXED}
const GLYPHS : {[name : string] : {code : string, x_shift : number, y_shift : number}};
}
class RaphaelContext implements IRenderContext {
//TODO remove the following lines once TypeScript allows subclass overrides with type changes or type inconsistencies mentioned below are fixed
setLineWidth(width : number) : RaphaelContext;
@@ -760,11 +760,6 @@ declare module Vex {
restore() : RaphaelContext;
}
export module Renderer {
const enum Backends {CANVAS, RAPHAEL, SVG, VML}
const enum LineEndType {NONE, UP, DOWN}
}
class Renderer {
constructor(sel : HTMLElement, backend : Renderer.Backends)
static USE_CANVAS_PROXY : boolean;
@@ -778,8 +773,9 @@ declare module Vex {
getContext() : IRenderContext;
}
export module Repetition {
const enum type {NONE, CODA_LEFT, CODA_RIGHT, SEGNO_LEFT, SEGNO_RIGHT, DC, DC_AL_CODA, DC_AL_FINE, DS, DS_AL_CODA, DS_AL_FINE, FINE}
namespace Renderer {
const enum Backends {CANVAS, RAPHAEL, SVG, VML}
const enum LineEndType {NONE, UP, DOWN}
}
class Repetition extends StaveModifier {
@@ -792,6 +788,10 @@ declare module Vex {
drawSignoFixed(stave : Stave, x : number) : Repetition; //inconsistent name: drawSignoFixed -> drawSegnoFixed
drawSymbolText(stave : Stave, x : number, text : string, draw_coda : boolean) : Repetition;
}
namespace Repetition {
const enum type { NONE, CODA_LEFT, CODA_RIGHT, SEGNO_LEFT, SEGNO_RIGHT, DC, DC_AL_CODA, DC_AL_FINE, DS, DS_AL_CODA, DS_AL_FINE, FINE }
}
class Stave {
constructor(x : number, y : number, width : number, options? : {vertical_bar_width? : number, glyph_spacing_px? : number, num_lines? : number, fill_style? : string, spacing_between_lines_px? : number, space_above_staff_ln? : number, space_below_staff_ln? : number, top_text_position? : number});
@@ -847,10 +847,6 @@ declare module Vex {
setConfigForLines(lines_configuration : {visible : boolean}[]) : Stave;
}
export module StaveConnector {
const enum type {SINGLE_RIGHT, SINGLE_LEFT, SINGLE, DOUBLE, BRACE, BRACKET, BOLD_DOUBLE_LEFT, BOLD_DOUBLE_RIGHT, THIN_DOUBLE}
}
class StaveConnector {
constructor(top_stave : Stave, bottom_stave : Stave);
setContext(ctx : IRenderContext) : StaveConnector;
@@ -861,9 +857,9 @@ declare module Vex {
draw() : void;
drawBoldDoubleLine(ctx : Object, type : StaveConnector.type, topX : number, topY : number, botY : number) : void;
}
export module StaveHairpin {
const enum type {CRESC, DECRESC}
namespace StaveConnector {
const enum type { SINGLE_RIGHT, SINGLE_LEFT, SINGLE, DOUBLE, BRACE, BRACKET, BOLD_DOUBLE_LEFT, BOLD_DOUBLE_RIGHT, THIN_DOUBLE }
}
class StaveHairpin {
@@ -876,10 +872,9 @@ declare module Vex {
renderHairpin(params : {first_x : number, last_x : number, first_y : number, last_y : number, staff_height : number}) : void;
draw() : boolean;
}
export module StaveLine {
const enum TextVerticalPosition {TOP, BOTTOM}
const enum TextJustification {LEFT, CENTER, RIGHT}
namespace StaveHairpin {
const enum type { CRESC, DECRESC }
}
class StaveLine {
@@ -896,6 +891,11 @@ declare module Vex {
render_options : {padding_left : number, padding_right : number, line_width : number, line_dash : number[], rounded_end : boolean, color : string, draw_start_arrow : boolean, draw_end_arrow : boolean, arrowhead_length : number, arrowhead_angle : number, text_position_vertical : StaveLine.TextVerticalPosition, text_justification : StaveLine.TextJustification};
}
namespace StaveLine {
const enum TextVerticalPosition { TOP, BOTTOM }
const enum TextJustification { LEFT, CENTER, RIGHT }
}
class StaveModifier {
getCategory() : string;
makeSpacer(padding : number) : {getContext: Function, setStave: Function, renderToStave: Function, getMetrics: Function};
@@ -907,12 +907,6 @@ declare module Vex {
addEndModifier() : void;
}
module StaveNote {
const STEM_UP : number;
const STEM_DOWN : number;
const CATEGORY : string;
}
class StaveNote extends StemmableNote {
//TODO remove the following lines once TypeScript allows subclass overrides with type changes and/or inconsistencies mentioned below are fixed
buildStem() : StemmableNote;
@@ -972,6 +966,12 @@ declare module Vex {
drawStem(struct : {x_begin? : number, x_end? : number, y_top? : number, y_bottom? : number, y_extend? : number, stem_extension? : number, stem_direction? : number}) : void;
draw() : void;
}
namespace StaveNote {
const STEM_UP: number;
const STEM_DOWN: number;
const CATEGORY: string;
}
class StaveSection extends Modifier {
//TODO remove the following lines once TypeScript allows subclass overrides with type changes
@@ -1019,11 +1019,6 @@ declare module Vex {
draw() : boolean;
}
module Stem {
const UP : number;
const DOWN : number;
}
class Stem {
constructor(options : {x_begin? : number, x_end? : number, y_top? : number, y_bottom? : number, y_extend? : number, stem_extension? : number, stem_direction? : number});
static DEBUG : boolean;
@@ -1044,6 +1039,11 @@ declare module Vex {
//inconsistent API: this should be set via the options object in the constructor
hide : boolean;
}
namespace Stem {
const UP: number;
const DOWN: number;
}
class StemmableNote extends Note {
//TODO remove the following lines once TypeScript allows subclass overrides with type changes
@@ -1071,10 +1071,6 @@ declare module Vex {
drawStem(stem_struct : {x_begin? : number, x_end? : number, y_top? : number, y_bottom? : number, y_extend? : number, stem_extension? : number, stem_direction? : number}) : void;
}
module StringNumber {
const CATEGORY : string;
}
class StringNumber extends Modifier {
//TODO remove the following lines once TypeScript allows subclass overrides with type changes
setNote(note : Note) : StringNumber;
@@ -1095,10 +1091,9 @@ declare module Vex {
setDashed(dashed : boolean) : StringNumber;
draw() : void;
}
export module Stroke {
const enum Type {BRUSH_DOWN, BRUSH_UP, ROLL_DOWN, ROLL_UP, RASQUEDO_DOWN, RASQUEDO_UP}
const CATEGORY : string;
namespace StringNumber {
const CATEGORY: string;
}
class Stroke extends Modifier {
@@ -1109,6 +1104,11 @@ declare module Vex {
draw() : void;
}
namespace Stroke {
const enum Type {BRUSH_DOWN, BRUSH_UP, ROLL_DOWN, ROLL_UP, RASQUEDO_DOWN, RASQUEDO_UP}
const CATEGORY : string;
}
class SVGContext implements IRenderContext {
constructor(element : HTMLElement);
iePolyfill() : boolean;
@@ -1175,11 +1175,6 @@ declare module Vex {
draw() : void;
}
module TabSlide {
const SLIDE_UP : number;
const SLIDE_DOWN : number;
}
class TabSlide extends TabTie {
constructor(notes : {first_note: Note, last_note: Note, first_indices : number[], last_indices : number[]}, direction? : number);
static createSlideUp(notes : {first_note: Note, last_note: Note, first_indices : number[], last_indices : number[]}) : TabSlide;
@@ -1187,6 +1182,11 @@ declare module Vex {
renderTie(params : {first_ys : number[], last_ys : number[], last_x_px : number, first_x_px : number, direction : number}) : void;
}
namespace TabSlide {
const SLIDE_UP : number;
const SLIDE_DOWN : number;
}
class TabStave extends Stave {
constructor(x : number, y : number, width : number, options? : {vertical_bar_width? : number, glyph_spacing_px? : number, num_lines? : number, fill_style? : string, spacing_between_lines_px? : number, space_above_staff_ln? : number, space_below_staff_ln? : number, top_text_position? : number});
getYForGlyphs() : number;
@@ -1200,10 +1200,6 @@ declare module Vex {
draw() : boolean;
}
export module TextBracket {
const enum Positions {TOP, BOTTOM}
}
class TextBracket {
constructor(bracket_data : {start : Note, stop : Note, text? : string, superscript? : string, position? : TextBracket.Positions});
static DEBUG : boolean;
@@ -1215,6 +1211,10 @@ declare module Vex {
draw() : void;
}
namespace TextBracket {
const enum Positions {TOP, BOTTOM}
}
class TextDynamics extends Note {
constructor(text_struct : {duration : string, text : string, line? : number});
static DEBUG : boolean;
@@ -1222,11 +1222,6 @@ declare module Vex {
preFormat() : TextDynamics;
draw() : void;
}
export module TextNote {
const enum Justification {LEFT, CENTER, RIGHT}
const GLYPHS : {[name : string] : {code : string, point : number, x_shift : number, y_shift : number}}
}
class TextNote extends Note {
constructor(text_struct : {duration : string, text? : string, superscript? : boolean, subscript? : boolean, glyph? : string, font? : {family : string, size : number, weight : string}, line? : number, smooth? : boolean, ignore_ticks? : boolean});
@@ -1236,6 +1231,11 @@ declare module Vex {
draw() : void;
}
namespace TextNote {
const enum Justification {LEFT, CENTER, RIGHT}
const GLYPHS : {[name : string] : {code : string, point : number, x_shift : number, y_shift : number}}
}
interface Tickable {
setContext(context : IRenderContext) : void;
getBoundingBox() : BoundingBox;
@@ -1286,10 +1286,6 @@ declare module Vex {
static getNextContext(tContext : TickContext) : TickContext;
}
module TimeSignature {
const glyphs : {[name : string] : {code : string, point : number, line : number}};
}
class TimeSignature extends StaveModifier {
//TODO remove the following lines once TypeScript allows subclass overrides with type changes
addModifier() : void;
@@ -1303,6 +1299,10 @@ declare module Vex {
addEndModifier(stave : Stave) : void;
}
namespace TimeSignature {
const glyphs : {[name : string] : {code : string, point : number, line : number}};
}
class TimeSigNote extends Note {
//TODO remove the following lines once TypeScript allows subclass overrides with type changes or type inconsistencies mentioned below are fixed
setStave(stave : Stave) : Note;
@@ -1321,10 +1321,6 @@ declare module Vex {
draw() : void;
}
module Tuning {
const names : {[name : string] : string};
}
class Tuning {
constructor(tuningString? : string);
noteToInteger(noteString : string) : number;
@@ -1334,9 +1330,8 @@ declare module Vex {
getNoteForFret(fretNum : string, stringNum : string) : string;
}
module Tuplet {
const LOCATION_TOP : number;
const LOCATION_BOTTOM : number;
namespace Tuning {
const names: { [name: string]: string };
}
class Tuplet {
@@ -1354,9 +1349,10 @@ declare module Vex {
resolveGlyphs() : void;
draw() : void;
}
module Vibrato {
const CATEGORY : string;
namespace Tuplet {
const LOCATION_TOP : number;
const LOCATION_BOTTOM : number;
}
class Vibrato extends Modifier {
@@ -1366,8 +1362,8 @@ declare module Vex {
draw() : void;
}
export module Voice {
const enum Mode {STRICT, SOFT, FULL}
namespace Vibrato {
const CATEGORY : string;
}
class Voice {
@@ -1393,21 +1389,25 @@ declare module Vex {
draw(context : IRenderContext, stave? : Stave) : void;
}
namespace Voice {
const enum Mode {STRICT, SOFT, FULL}
}
class VoiceGroup {
getVoices() : Voice[];
getModifierContexts() : ModifierContext[];
addVoice(voice : Voice) : void;
}
export module Volta {
const enum type {NONE, BEGIN, MID, END, BEGIN_END}
}
class Volta extends StaveModifier {
constructor(type : Volta.type, number : number, x : number, y_shift : number);
getCategory() : string;
setShiftY(y : number) : Volta;
draw(stave : Stave, x : number) : Volta;
}
namespace Volta {
const enum type {NONE, BEGIN, MID, END, BEGIN_END}
}
}
}
+10
View File
@@ -98,6 +98,11 @@ declare module "winston" {
* @type {(boolean|(err: Error) => void)}
*/
exitOnError?: any;
// TODO: Need to make instances specific,
// and need to get options for each instance.
// Unfortunately, the documentation is unhelpful.
[optionName: string]: any;
}
export interface TransportStatic {
@@ -141,6 +146,11 @@ declare module "winston" {
raw?: boolean;
name?: string;
handleExceptions?: boolean;
// TODO: Need to make instances specific,
// and need to get options for each instance.
// Unfortunately, the documentation is unhelpful.
[optionName: string]: any;
}
export interface QueryOptions {