diff --git a/valerie/valerie-tests.ts b/valerie/valerie-tests.ts index b33932e29..6657682ee 100644 --- a/valerie/valerie-tests.ts +++ b/valerie/valerie-tests.ts @@ -294,7 +294,7 @@ function ModelValidation() { var validatedModel = valerie.validatableModel(model) .validateAll() .end(); - + } function UtilsStaticTests() { diff --git a/valerie/valerie.d.ts b/valerie/valerie.d.ts index abe5aea28..d08b18c75 100644 --- a/valerie/valerie.d.ts +++ b/valerie/valerie.d.ts @@ -255,7 +255,7 @@ declare module Valerie { /* //TODO: additional namespaces/statics not yet used - dom: DomStatic; + dom: DomStatic; formatting: FormattingStatic; koBindingsHelper: KoBindingsHelperStatic; koExtras: KoExtrasStatic; @@ -278,7 +278,7 @@ declare module Valerie { // Contains converters, always singletons. interface ConvertersStatic { - + //TODO: other converters to be added passThrough: Valerie.IConverter; @@ -365,19 +365,19 @@ declare module Valerie { */ clearSummary(valueOrFunction: any): ModelValidationState; - /*** + /*** * Gets whether the model has failed validation. * @return {boolean} */ failed(): boolean; - /*** + /*** * Gets the validation states that belong to the model that are in a failure state. * @return {Valerie.IValidationState[]} */ failedStates(): Valerie.IValidationState[]; - /*** + /*** * Gets the name of the model. * @return {string} */ @@ -387,7 +387,7 @@ declare module Valerie { message(): string; passed(): boolean; - /*** + /*** * Gets or sets whether the computation that updates the validation result has been paused. * @param {boolean} [value = false] true if the computation should be paused, false if the computation should not be paused * @return {boolean} true if computation is paused, false otherwise diff --git a/vec3/vec3.d.ts b/vec3/vec3.d.ts index 29bac0c56..28cb46c3e 100644 --- a/vec3/vec3.d.ts +++ b/vec3/vec3.d.ts @@ -9,7 +9,7 @@ declare module "vec3" { constructor(location: number[]); constructor(location: {x: number; y: number; z: number}); constructor(locationStr: string); - + set(x: number, y: number, z: number): Vec3; update(other: Vec3): Vec3; floored(): Vec3; @@ -31,4 +31,4 @@ declare module "vec3" { min(other: Vec3): Vec3; max(other: Vec3): Vec3; } -} \ No newline at end of file +} diff --git a/vega/vega.d.ts b/vega/vega.d.ts index 4441cceae..80c91149a 100644 --- a/vega/vega.d.ts +++ b/vega/vega.d.ts @@ -65,7 +65,7 @@ declare namespace Vega { props?: string; items?: any; duration?: number; - ease?: string; + ease?: string; } export interface Bounds { @@ -518,7 +518,7 @@ declare namespace vg { export namespace scene { export function item(mark: Vega.Node): Vega.Node; } - + export class Bounds implements Vega.Bounds { x1: number; y1: number; @@ -540,4 +540,4 @@ declare namespace vg { } // TODO: classes for View, Model, etc. -} \ No newline at end of file +} diff --git a/vexflow/vexflow.d.ts b/vexflow/vexflow.d.ts index c17e96576..5c304fa30 100644 --- a/vexflow/vexflow.d.ts +++ b/vexflow/vexflow.d.ts @@ -4,10 +4,10 @@ // Definitions: https://github.com/borisyankov/DefinitelyTyped //inconsistent namespace: this is a helper funtion from tables.js and should not pollute the global namespace! -declare function sanitizeDuration(duration : string) : string; +declare function sanitizeDuration(duration : string) : string; declare namespace Vex { - + function L(block : string, args : any[]) : void; function Merge(destination : T, source : Object) : T; function Min(a : number, b : number) : number; @@ -20,15 +20,15 @@ declare namespace Vex { function drawDot(ctx : IRenderContext, x : number, y : number, color? : string) : void; function BM(s : number, f : Function) : void; function Inherit(child : T, parent : Object, object : Object) : T; - + class RuntimeError { constructor(code : string, message : string); } - + class RERR { constructor(code : string, message : string); } - + /** * Helper interface for handling the different rendering contexts (i.e. CanvasContext, RaphaelContext, SVGContext). Not part of VexFlow! */ @@ -61,13 +61,13 @@ declare namespace Vex { fillText(text : string, x : number, y : number) : IRenderContext; save() : IRenderContext; restore() : IRenderContext; - + /** * canvas returns TextMetrics, SVG returns SVGRect, Raphael returns {width : number, height : number}. Only width is used throughout VexFlow. */ measureText(text : string) : {width : number}; } - + /** * Helper interface for handling the Vex.Flow.Font object in Vex.Flow.Glyph. Not part of VexFlow! */ @@ -83,17 +83,17 @@ declare namespace Vex { familyName : string; lineHeight : number; underlineThickness : number; - + /** * This property is missing in vexflow_font.js, but present in gonville_original.js and gonville_all.js. */ 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}; } - + namespace Flow { - + const RESOLUTION : number; - + // from tables.js: const STEM_WIDTH : number; const STEM_HEIGHT : number; @@ -115,10 +115,10 @@ declare namespace Vex { function durationToNumber(duration : string) : number; function durationToTicks(duration : string) : number; function durationToGlyph(duration : string, type : string) : {head_width : number, stem : boolean, stem_offset : number, flag : boolean, stem_up_extension : number, stem_down_extension : number, gracenote_stem_up_extension : number, gracenote_stem_down_extension : number, tabnote_stem_up_extension : number, tabnote_stem_down_extension : number, dot_shiftY : number, line_above : number, line_below : number, code_head? : string, rest? : boolean, position? : string}; - + // from glyph.js: function renderGlyph(ctx : IRenderContext, x_pos : number, y_pos : number, point : number, val : string, nocache : boolean) : void; - + // from vexflow_font.js / gonville_original.js / gonville_all.js var Font : { glyphs : {x_min : number, x_max : number, ha : number, o : string[]}[]; @@ -132,15 +132,15 @@ declare namespace Vex { familyName : string; lineHeight : number; underlineThickness : number; - + //inconsistent member : this is missing in vexflow_font.js, but present in gonville_original.js and gonville_all.js 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}; } - + class Accidental extends Modifier { //TODO remove the following lines once TypeScript allows subclass overrides with type changes setNote(note : Note) : Modifier; - + constructor(type : string); static DEBUG : boolean; static format(accidentals : Accidental[], state : {left_shift : number, right_shift : number, text_line : number}) : void; @@ -149,11 +149,11 @@ declare namespace Vex { draw() : void; static applyAccidentals(voices : Voice[], keySignature? : string) : void; } - + namespace Accidental { const CATEGORY : string; } - + class Annotation extends Modifier { constructor(text : string); static DEBUG : boolean; @@ -165,24 +165,24 @@ declare namespace Vex { setJustification(justification : Annotation.Justify) : Annotation; draw() : void; } - + namespace Annotation { const enum Justify {LEFT, CENTER, RIGHT, CENTER_STEM} const enum VerticalJustify {TOP, CENTER, BOTTOM, CENTER_STEM} const CATEGORY : string; } - + class Articulation extends Modifier { constructor(type : string); static DEBUG : boolean; static format(articulations : Articulation[], state : {left_shift : number, right_shift : number, text_line : number}) : boolean; draw() : void; } - + namespace Articulation { const CATEGORY : string; } - + class BarNote extends Note { static DEBUG : boolean; getType() : Barline.type; @@ -192,11 +192,11 @@ declare namespace Vex { preFormat() : BarNote; draw() : void; } - + namespace Barline { const enum type {SINGLE, DOUBLE, END, REPEAT_BEGIN, REPEAT_END, REPEAT_BOTH, NONE} } - + class Barline extends StaveModifier { constructor(type : Barline.type, x : number); getCategory() : string; @@ -206,7 +206,7 @@ declare namespace Vex { drawVerticalEndBar(stave : Stave, x : number) : void; drawRepeatBar(stave : Stave, x : number, begin : boolean) : void; } - + class Beam { constructor(notes : StemmableNote[], auto_stem? : boolean); setContext(context : IRenderContext) : Beam; @@ -227,7 +227,7 @@ declare namespace Vex { static applyAndGetBeams(voice : Voice, stem_direction : number, groups : Fraction[]) : Beam[]; 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[]; } - + class Bend extends Modifier { constructor(text : string, release? : boolean, phrase? : {type : number, text : string, width : number}[]); static UP : number; @@ -239,11 +239,11 @@ declare namespace Vex { updateWidth() : Bend; draw() : void; } - + namespace Bend { const CATEGORY : string; } - + class BoundingBox { constructor(x : number, y : number, w : number, h : number); static copy(that : BoundingBox) : BoundingBox; @@ -260,7 +260,7 @@ declare namespace Vex { mergeWith(boundingBox : BoundingBox, ctx? : IRenderContext) : BoundingBox; draw(ctx : IRenderContext, x : number, y : number) : void; } - + class CanvasContext implements IRenderContext { //TODO remove the following lines once TypeScript allows subclass overrides with type changes or type inconsistencies mentioned below are fixed setLineDash(dash : string) : CanvasContext; @@ -281,7 +281,7 @@ declare namespace Vex { fillText(text : string, x : number, y : number) : CanvasContext; save() : CanvasContext; restore() : CanvasContext; - + constructor(context : CanvasRenderingContext2D); static WIDTH : number; static HEIGHT : number; @@ -295,7 +295,7 @@ declare namespace Vex { setShadowBlur(blur : string) : CanvasContext; setLineWidth(width : number) : CanvasContext; setLineCap(cap_type : string) : CanvasContext; - + //inconsistent type: void -> CanvasContext setLineDash(dash : string) : void; scale(x : number, y : number) : void; @@ -317,22 +317,22 @@ declare namespace Vex { save() : void; restore() : void; } - + class Clef extends StaveModifier { //TODO remove the following lines once TypeScript allows subclass overrides with type changes addModifier() : void; addEndModifier() : void; - + constructor(clef : string, size? : string, annotation? : string); static DEBUG : boolean; addModifier(stave : Stave) : void; addEndModifier(stave : Stave) : void; } - + class ClefNote extends Note { //TODO remove the following lines once TypeScript allows subclass overrides with type changes setStave(stave : Stave) : Note; - + constructor(clef : string, size? : string, annotation? : string); setClef(clef : string, size? : string, annotation? : string) : ClefNote; getClef() : string; @@ -343,7 +343,7 @@ declare namespace Vex { preFormat() : ClefNote; draw() : void; } - + class Crescendo extends Note { constructor(note_struct : {duration : number, line? : number}); static DEBUG : boolean; @@ -353,7 +353,7 @@ declare namespace Vex { preFormat() : Crescendo; draw() : void; } - + 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; @@ -363,28 +363,28 @@ declare namespace Vex { renderCurve(params : {first_x : number, first_y : number, last_x : number, last_y : number, direction : number}) : void; draw() : boolean; } - + namespace Curve { const enum Position {NEAR_HEAD, NEAR_TOP} } - + class Dot extends Modifier { //TODO remove the following lines once TypeScript allows subclass overrides with type changes or type inconsistencies mentioned below are fixed setNote(note : Note) : Dot; - + static format(dots : number, state : {left_shift : number, right_shift : number, text_line : number}) : void; setNote(note : Note) : void; //inconsistent type: void -> Dot setDotShiftY(y : number) : Dot; 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; + static FormatAndDraw(ctx : IRenderContext, stave : Stave, notes : Note[], params? : {auto_beam : boolean, align_rests : boolean}) : BoundingBox; static FormatAndDraw(ctx : IRenderContext, stave : Stave, notes : Note[], params? : boolean) : BoundingBox; static FormatAndDrawTab(ctx : IRenderContext, tabstave : TabStave, stave : Stave, tabnotes : TabNote[], notes : Note[], autobeam? : boolean, params? : {auto_beam : boolean, align_rests : boolean}) : void; static FormatAndDrawTab(ctx : IRenderContext, tabstave : TabStave, stave : Stave, tabnotes : TabNote[], notes : Note[], autobeam? : boolean, params? : boolean) : void; @@ -400,7 +400,7 @@ declare namespace Vex { format(voices : Voice[], justifyWidth : number, options? : {align_rests? : boolean, context : IRenderContext}) : Formatter; formatToStave(voices : Voice[], stave : Stave, options? : {align_rests? : boolean, context : IRenderContext}) : Formatter; } - + class Fraction { constructor(numerator : number, denominator : number); static GCD(a : number, b : number) : number; @@ -432,7 +432,7 @@ declare namespace Vex { toMixedString() : string; parse(str : string) : Fraction; } - + class FretHandFinger extends Modifier { constructor(number : number); static format(nums : FretHandFinger[], state : {left_shift : number, right_shift : number, text_line : number}) : void; @@ -447,15 +447,15 @@ declare namespace Vex { setOffsetY(y : number) : FretHandFinger; 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; - + constructor(duration : string); constructor(note_struct : {type? : string, dots? : number, duration : string}); //inconsistent name : init struct is called 'duration', should be 'params'/'options' (may be string or Object) isRest() : boolean; @@ -464,7 +464,7 @@ declare namespace Vex { preFormat() : GhostNote; draw() : void; } - + class Glyph { constructor(code : string, point : number, options? : {cache? : boolean, font? : IFont}); setOptions(options : {cache? : boolean, font? : IFont}) : void; @@ -481,19 +481,19 @@ declare namespace Vex { static loadMetrics(font : IFont, code : string, cache : boolean) : {x_min : number, x_max : number, ha : number, outline : number[]}; static renderOutline(ctx : IRenderContext, outline : number[], scale : number, x_pos : number, y_pos : number) : void; } - + class GraceNote extends StaveNote { constructor(note_struct : {slash? : boolean, type? : string, dots? : number, duration : string, clef? : string, keys : string[], octave_shift? : number, auto_stem? : boolean, stem_direction? : number}); getStemExtension() : number; getCategory() : string; draw() : void; } - + 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; setNote(note : StaveNote) : Modifier; - + constructor(grace_notes : GraceNote[], show_slur? : boolean); //inconsistent name: 'show_slur' is called 'config', suggesting object (is boolean) static DEBUG : boolean; static format(gracenote_groups : GraceNoteGroup[], state : {left_shift : number, right_shift : number, text_line : number}) : boolean; @@ -505,11 +505,11 @@ declare namespace Vex { setXShift(x_shift : number) : void; draw() : void; } - + namespace GraceNoteGroup { const CATEGORY : string; } - + class KeyManager { constructor(key : string); setKey(key : string) : KeyManager; @@ -518,11 +518,11 @@ declare namespace Vex { getAccidental(key : string) : {note : string, accidental : string}; selectNote(note : string) : {note : string, accidental : string, change : boolean}; } - + class KeySignature extends StaveModifier { //TODO remove the following lines once TypeScript allows subclass overrides with type changes addModifier() : void; - + constructor(key_spec : string); addAccToStave(stave : Stave, acc : {type : string, line : number}, next? : {type : string, line : number}) : void; cancelKey(spec : string) : KeySignature; @@ -530,7 +530,7 @@ declare namespace Vex { addToStave(stave : Stave, firstGlyph? : boolean) : KeySignature; convertAccLines(clef : string, type : string) : void; } - + class Modifier { static DEBUG : boolean; getCategory() : string; @@ -551,12 +551,12 @@ declare namespace Vex { setXShift(x : number) : void; //inconsistent type: void -> Modifier draw() : void; } - + namespace Modifier { const enum Position {LEFT, RIGHT, ABOVE, BELOW} const CATEGORY : string } - + class ModifierContext { static DEBUG : boolean; addModifier(modifier : Modifier) : ModifierContext; @@ -569,7 +569,7 @@ declare namespace Vex { preFormat() : void; postFormat() : void; } - + class Music { isValidNoteValue(note : number) : boolean; isValidIntervalValue(interval : number) : boolean; @@ -585,7 +585,7 @@ declare namespace Vex { getIntervalBetween(note1 : number, note2 : number, direction? : number) : number; createScaleMap(keySignature : string) : {[rootName : string] : string}; } - + namespace Music { const NUM_TONES : number; const roots : string[]; @@ -599,7 +599,7 @@ declare namespace Vex { const accidentals : string[]; const noteValues : {[value : string] : {root_index : number, int_val : number}}; } - + class Note implements Tickable { //from tickable interface: getTicks() : Fraction; @@ -616,7 +616,7 @@ declare namespace Vex { getTickMultiplier() : Fraction; applyTickMultiplier(numerator : number, denominator : number) : void; setDuration(duration : Fraction) : void; - + constructor(note_struct : {type? : string, dots? : number, duration : string}); getPlayNote() : any; setPlayNote(note : any) : Note; @@ -659,11 +659,11 @@ declare namespace Vex { getAbsoluteX() : number; 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; @@ -686,7 +686,7 @@ declare namespace Vex { preFormat() : NoteHead; draw() : void; } - + class Ornament extends Modifier { constructor(type : string); static DEBUG : boolean; @@ -696,11 +696,11 @@ declare namespace Vex { setLowerAccidental(acc : string) : Ornament; draw() : void; } - + namespace Ornament { const CATEGORY : string; } - + class PedalMarking { constructor(notes : Note[]); //inconsistent name: 'notes' is called 'type', suggesting string (is Note[]) static DEBUG : boolean; @@ -715,17 +715,17 @@ declare namespace Vex { drawText() : void; 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; glow() : RaphaelContext; - + constructor(element : HTMLElement); setFont(family : string, size : number, weight? : number) : RaphaelContext; setRawFont(font : string) : RaphaelContext; @@ -759,7 +759,7 @@ declare namespace Vex { save() : RaphaelContext; restore() : RaphaelContext; } - + class Renderer { constructor(sel : HTMLElement, backend : Renderer.Backends) static USE_CANVAS_PROXY : boolean; @@ -772,12 +772,12 @@ declare namespace Vex { resize(width : number, height : number) : Renderer; getContext() : IRenderContext; } - + namespace Renderer { const enum Backends {CANVAS, RAPHAEL, SVG, VML} const enum LineEndType {NONE, UP, DOWN} } - + class Repetition extends StaveModifier { constructor(type : Repetition.type, x : number, y_shift : number); getCategory() : string; @@ -792,7 +792,7 @@ declare namespace Vex { 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}); resetLines() : void; @@ -846,7 +846,7 @@ declare namespace Vex { setConfigForLine(line_number : number, line_config : {visible : boolean}) : Stave; setConfigForLines(lines_configuration : {visible : boolean}[]) : Stave; } - + class StaveConnector { constructor(top_stave : Stave, bottom_stave : Stave); setContext(ctx : IRenderContext) : StaveConnector; @@ -861,7 +861,7 @@ declare namespace Vex { namespace StaveConnector { const enum type { SINGLE_RIGHT, SINGLE_LEFT, SINGLE, DOUBLE, BRACE, BRACKET, BOLD_DOUBLE_LEFT, BOLD_DOUBLE_RIGHT, THIN_DOUBLE } } - + class StaveHairpin { constructor(notes : {first_note : Note, last_note : Note}, type : StaveHairpin.type); static FormatByTicksAndDraw(ctx : IRenderContext, formatter : Formatter, notes : {first_note : Note, last_note : Note}, type : StaveHairpin.type, position : Modifier.Position, options? : {height : number, y_shift : number, left_shift_ticks : number, right_shift_ticks : number}) : void; @@ -876,7 +876,7 @@ declare namespace Vex { namespace StaveHairpin { const enum type { CRESC, DECRESC } } - + class StaveLine { constructor(notes : {first_note: Note, last_note: Note, first_indices : number[], last_indices : number[]}); setContext(context : Object) : StaveLine; @@ -886,11 +886,11 @@ declare namespace Vex { applyLineStyle() : void; applyFontStyle() : void; draw() : StaveLine; - + //inconsistent API: this should be set via an options object in the constructor 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 } @@ -906,10 +906,10 @@ declare namespace Vex { addModifier() : void; addEndModifier() : void; } - + 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; + buildStem() : StemmableNote; setStave(stave : Stave) : Note; addModifier(modifier : Modifier, index? : number) : Note; getModifierStartXY() : {x : number, y : number}; @@ -972,11 +972,11 @@ declare namespace Vex { const STEM_DOWN: number; const CATEGORY: string; } - + class StaveSection extends Modifier { //TODO remove the following lines once TypeScript allows subclass overrides with type changes draw() : void; - + constructor(section : string, x : number, shift_y : number); getCategory() : string; setStaveSection(section : string) : StaveSection; @@ -984,7 +984,7 @@ declare namespace Vex { setShiftY(y : number) : StaveSection; draw(stave : Stave, shift_x : number) : StaveSection; } - + class StaveTempo extends StaveModifier { constructor(tempo : {name? : string, duration : string, dots : number, bpm : number}, x : number, shift_y : number); getCategory() : string; @@ -993,11 +993,11 @@ declare namespace Vex { setShiftY(y : number) : StaveTempo; draw(stave : Stave, shift_x : number) : StaveTempo; } - + class StaveText extends Modifier { //TODO remove the following lines once TypeScript allows subclass overrides with type changes draw() : void; - + constructor(text : string, position : Modifier.Position, options? : {shift_x? : number, shift_y? : number, justification? : TextNote.Justification}); getCategory() : string; setStaveText(text : string) : StaveText; @@ -1007,7 +1007,7 @@ declare namespace Vex { setText(text : string) : void; draw(stave : Stave) : StaveText; } - + class StaveTie { constructor(notes : {first_note: Note, last_note: Note, first_indices : number[], last_indices : number[]}, text? : string); setContext(context : IRenderContext) : StaveTie; @@ -1018,7 +1018,7 @@ declare namespace Vex { renderText(first_x_px : number, last_x_px : number) : void; draw() : boolean; } - + 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; @@ -1035,7 +1035,7 @@ declare namespace Vex { getStyle() : {shadowColor? : string, shadowBlur? : string, fillStyle? : string, strokeStyle? : string}; applyStyle(context : IRenderContext) : Stem; draw() : void; - + //inconsistent API: this should be set via the options object in the constructor hide : boolean; } @@ -1044,11 +1044,11 @@ declare namespace Vex { const UP: number; const DOWN: number; } - + class StemmableNote extends Note { //TODO remove the following lines once TypeScript allows subclass overrides with type changes setBeam() : Note; - + constructor(note_struct : {type? : string, dots? : number, duration : string}); static DEBUG : boolean; getStem() : Stem; @@ -1070,11 +1070,11 @@ declare namespace Vex { postFormat() : StemmableNote; 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; } - + class StringNumber extends Modifier { //TODO remove the following lines once TypeScript allows subclass overrides with type changes setNote(note : Note) : StringNumber; - + constructor(number : number); static format(nums : StringNumber[], state : {left_shift : number, right_shift : number, text_line : number}) : boolean; getNote() : Note; @@ -1095,7 +1095,7 @@ declare namespace Vex { namespace StringNumber { const CATEGORY: string; } - + class Stroke extends Modifier { constructor(type : Stroke.Type, options : {all_voices? : boolean}); static format(strokes : Stroke[], state : {left_shift : number, right_shift : number, text_line : number}) : boolean; @@ -1103,7 +1103,7 @@ declare namespace Vex { addEndNote(note : Note) : Stroke; draw() : void; } - + namespace Stroke { const enum Type {BRUSH_DOWN, BRUSH_UP, ROLL_DOWN, ROLL_UP, RASQUEDO_DOWN, RASQUEDO_UP} const CATEGORY : string; @@ -1145,12 +1145,12 @@ declare namespace Vex { save() : SVGContext; restore() : SVGContext; } - + class TabNote extends StemmableNote { //TODO remove the following lines once TypeScript allows subclass overrides with type changes setStave(stave : Stave) : Note; getModifierStartXY() : {x : number, y : number}; - + constructor(tab_struct : {positions : {str : number, fret : number}[], type? : string, dots? : number, duration : string, stem_direction? : boolean}, draw_stem? : boolean); getCategory() : string; setGhost(ghost : boolean) : TabNote; @@ -1174,32 +1174,32 @@ declare namespace Vex { drawStemThrough() : void; draw() : void; } - + 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; static createSlideDown(notes : {first_note: Note, last_note: Note, first_indices : number[], last_indices : number[]}) : TabSlide; 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; addTabGlyph() : TabStave; } - + class TabTie extends StaveTie { constructor(notes : {first_note: Note, last_note: Note, first_indices : number[], last_indices : number[]}, text? : string); createHammeron(notes : {first_note: Note, last_note: Note, first_indices : number[], last_indices : number[]}) : TabTie; createPulloff(notes : {first_note: Note, last_note: Note, first_indices : number[], last_indices : number[]}) : TabTie; draw() : boolean; } - + class TextBracket { constructor(bracket_data : {start : Note, stop : Note, text? : string, superscript? : string, position? : TextBracket.Positions}); static DEBUG : boolean; @@ -1210,11 +1210,11 @@ declare namespace Vex { setLine(line : number) : TextBracket; 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; @@ -1230,12 +1230,12 @@ declare namespace Vex { preFormat() : void; 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; @@ -1261,7 +1261,7 @@ declare namespace Vex { applyTickMultiplier(numerator : number, denominator : number) : void; setDuration(duration : Fraction) : void; } - + class TickContext { setContext(context : IRenderContext) : void; getContext() : IRenderContext; @@ -1285,12 +1285,12 @@ declare namespace Vex { postFormat() : TickContext; static getNextContext(tContext : TickContext) : TickContext; } - + class TimeSignature extends StaveModifier { //TODO remove the following lines once TypeScript allows subclass overrides with type changes addModifier() : void; addEndModifier() : void; - + constructor(timeSpec : string, customPadding? : number); parseTimeSpec(timeSpec : string) : {num : number, glyph : Glyph}; makeTimeSignatureGlyph(topNums : number[], botNums : number[]) : Glyph; @@ -1298,11 +1298,11 @@ declare namespace Vex { addModifier(stave : Stave) : void; 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; @@ -1314,26 +1314,26 @@ declare namespace Vex { preFormat() : TimeSigNote; draw() : void; } - + class Tremolo extends Modifier { constructor(num : number); getCategory() : string; draw() : void; } - + class Tuning { constructor(tuningString? : string); noteToInteger(noteString : string) : number; setTuning(tuningString : string) : void; getValueForString(stringNum : string) : number; getValueForFret(fretNum : string, stringNum : string) : number; - getNoteForFret(fretNum : string, stringNum : string) : string; + getNoteForFret(fretNum : string, stringNum : string) : string; } - + namespace Tuning { const names: { [name: string]: string }; } - + class Tuplet { constructor(notes : StaveNote[], options : {num_notes? : number, beats_occupied? : number}); attach() : void; @@ -1352,20 +1352,20 @@ declare namespace Vex { namespace Tuplet { const LOCATION_TOP : number; - const LOCATION_BOTTOM : number; + const LOCATION_BOTTOM : number; } - + class Vibrato extends Modifier { static format(vibratos : Vibrato[], state : {left_shift : number, right_shift : number, text_line : number}, context : ModifierContext) : boolean; setHarsh(harsh : boolean) : Vibrato; setVibratoWidth(width : number) : Vibrato; - draw() : void; + draw() : void; } - + namespace Vibrato { const CATEGORY : string; } - + class Voice { constructor(time : {num_beats? : number, beat_value? : number, resolution? : number}); getTotalTicks() : Fraction; @@ -1388,26 +1388,26 @@ declare namespace Vex { preFormat() : Voice; draw(context : IRenderContext, stave? : Stave) : void; } - + namespace Voice { const enum Mode {STRICT, SOFT, FULL} } - + class VoiceGroup { getVoices() : Voice[]; getModifierContexts() : ModifierContext[]; addVoice(voice : Voice) : void; } - + 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} } } -} \ No newline at end of file +} diff --git a/videojs/videojs-tests.ts b/videojs/videojs-tests.ts index 00a70a661..15cbc2f8b 100644 --- a/videojs/videojs-tests.ts +++ b/videojs/videojs-tests.ts @@ -63,7 +63,7 @@ videojs("example_video_1").ready(function(){ myPlayer.cancelFullScreen(); - + var myFunc = function(){ var myPlayer: VideoJSPlayer = this; // Do something when the event is fired diff --git a/videojs/videojs.d.ts b/videojs/videojs.d.ts index e29f3b43d..7723f8801 100644 --- a/videojs/videojs.d.ts +++ b/videojs/videojs.d.ts @@ -34,10 +34,10 @@ interface VideoJSPlayer { currentTime(): number; duration(): number; buffered(): TimeRanges; - bufferedPercent(): number; + bufferedPercent(): number; volume(percentAsDecimal: number): TimeRanges; volume(): number; - width(): number; + width(): number; width(pixels: number): VideoJSPlayer; height(): number; height(pixels: number): VideoJSPlayer; diff --git a/voximplant-websdk/voximplant-websdk-tests.ts b/voximplant-websdk/voximplant-websdk-tests.ts index 5dcb6c62e..ace457cd2 100644 --- a/voximplant-websdk/voximplant-websdk-tests.ts +++ b/voximplant-websdk/voximplant-websdk-tests.ts @@ -5,7 +5,7 @@ var vox: VoxImplant.Client = VoxImplant.getInstance(), room: string; vox.init({ - micRequired: true + micRequired: true }); vox.addEventListener(VoxImplant.Events.SDKReady, function(event: VoxImplant.Events.SDKReady) { diff --git a/voximplant-websdk/voximplant-websdk.d.ts b/voximplant-websdk/voximplant-websdk.d.ts index e3ba00655..1df4e5e31 100644 --- a/voximplant-websdk/voximplant-websdk.d.ts +++ b/voximplant-websdk/voximplant-websdk.d.ts @@ -3,7 +3,7 @@ // Definitions by: Alexey Aylarov // Definitions: https://github.com/borisyankov/DefinitelyTyped -declare namespace VoxImplant { +declare namespace VoxImplant { /** * VoxImplant.Client general events @@ -12,7 +12,7 @@ declare namespace VoxImplant { AuthResult, ConnectionClosed, ConnectionEstablished, - ConnectionFailed, + ConnectionFailed, IncomingCall, MicAccessResult, NetStatsReceived, @@ -44,14 +44,14 @@ declare namespace VoxImplant { ChatRoomPresenceUpdate, ChatRoomStateUpdate, ChatRoomSubjectChange, - ChatRoomsDataReceived, + ChatRoomsDataReceived, ChatStateUpdate, - MessageModified, - MessageNotModified, + MessageModified, + MessageNotModified, MessageReceived, - MessageRemoved, + MessageRemoved, MessageStatus, - PresenceUpdate, + PresenceUpdate, RosterItemChange, RosterPresenceUpdate, RosterReceived, @@ -123,7 +123,7 @@ declare namespace VoxImplant { * Failure reason description */ message: string; - } + } /** * Event dispatched when there is a new incoming call to current user @@ -196,7 +196,7 @@ declare namespace VoxImplant { */ headers?: Object; } - + /** * Event dispatched after call was disconnected */ @@ -320,7 +320,7 @@ declare namespace VoxImplant { } } - module IMEvents { + module IMEvents { /** * Event dispatched when chat history received @@ -389,7 +389,7 @@ declare namespace VoxImplant { /** * Event dispatched when chat room history received */ - interface ChatRoomHistoryReceived { + interface ChatRoomHistoryReceived { /** * Message id specified in getInstantMessagingHistory method */ @@ -407,7 +407,7 @@ declare namespace VoxImplant { /** * Event dispatched when user joins chat room */ - interface ChatRoomInfo { + interface ChatRoomInfo { /** * Room features */ @@ -429,7 +429,7 @@ declare namespace VoxImplant { /** * Event dispatched when invitation to chat room received */ - interface ChatRoomInvitation { + interface ChatRoomInvitation { /** * The body of the message */ @@ -455,7 +455,7 @@ declare namespace VoxImplant { /** * Event dispatched if an invitation to chat room was declined by the invitee */ - interface ChatRoomInviteDeclined { + interface ChatRoomInviteDeclined { /** * User id (invitee) */ @@ -473,7 +473,7 @@ declare namespace VoxImplant { /** * Event dispatched when chat room message modified */ - interface ChatRoomMessageModified { + interface ChatRoomMessageModified { /** * New message content */ @@ -507,7 +507,7 @@ declare namespace VoxImplant { /** * Event dispatched in case of error during chat room message modification */ - interface ChatRoomMessageNotModified { + interface ChatRoomMessageNotModified { /** * Error code */ @@ -529,7 +529,7 @@ declare namespace VoxImplant { /** * Event dispatched when instant message was sent to chat room */ - interface ChatRoomMessageReceived { + interface ChatRoomMessageReceived { /** * Message content */ @@ -563,7 +563,7 @@ declare namespace VoxImplant { /** * Event dispatched when chat room message removed */ - interface ChatRoomMessageRemoved { + interface ChatRoomMessageRemoved { /** * User id */ @@ -593,7 +593,7 @@ declare namespace VoxImplant { /** * Event dispatched when new participant joined the chat room */ - interface ChatRoomNewParticipant { + interface ChatRoomNewParticipant { /** * User display name */ @@ -609,7 +609,7 @@ declare namespace VoxImplant { } /** - * Event dispatched when chat room participant was banned/unbanned + * Event dispatched when chat room participant was banned/unbanned */ interface ChatRoomOperation { /** @@ -629,7 +629,7 @@ declare namespace VoxImplant { /** * Event dispatched when participant left the chat room */ - interface ChatRoomParticipantExit { + interface ChatRoomParticipantExit { /** * User id */ @@ -643,7 +643,7 @@ declare namespace VoxImplant { /** * Event dispatched when info about chat room participants received */ - interface ChatRoomParticipants { + interface ChatRoomParticipants { /** * Participants list */ @@ -657,7 +657,7 @@ declare namespace VoxImplant { /** * Event dispatched if chat room participant presence status was updated */ - interface ChatRoomPresenceUpdate { + interface ChatRoomPresenceUpdate { /** * Optional presence message */ @@ -679,7 +679,7 @@ declare namespace VoxImplant { /** * Event dispatched when chat session state updated */ - interface ChatRoomStateUpdate { + interface ChatRoomStateUpdate { /** * User id */ @@ -687,7 +687,7 @@ declare namespace VoxImplant { /** * Resource name */ - resource: string; + resource: string; /** * Room id */ @@ -701,7 +701,7 @@ declare namespace VoxImplant { /** * Event dispatched if chat room subject was changed */ - interface ChatRoomSubjectChange { + interface ChatRoomSubjectChange { /** * User id who changed the subject */ @@ -709,7 +709,7 @@ declare namespace VoxImplant { /** * Resource name */ - resource: string; + resource: string; /** * Room id */ @@ -723,7 +723,7 @@ declare namespace VoxImplant { /** * Event dispatched when information about chat rooms where user participates received */ - interface ChatRoomsDataReceived { + interface ChatRoomsDataReceived { /** * Rooms list */ @@ -899,7 +899,7 @@ declare namespace VoxImplant { /** * Roster item event type. See VoxImplant.RosterItemEvent enum */ - type: RosterItemEvent; + type: RosterItemEvent; } /** @@ -987,7 +987,7 @@ declare namespace VoxImplant { } type VoxImplantEvent = Events.AuthResult | Events.ConnectionClosed | Events.ConnectionEstablished | - Events.ConnectionFailed | Events.IncomingCall | Events.MicAccessResult | + Events.ConnectionFailed | Events.IncomingCall | Events.MicAccessResult | Events.NetStatsReceived | Events.PlaybackFinished | Events.SDKReady | Events.SourcesInfoUpdated; @@ -995,17 +995,17 @@ declare namespace VoxImplant { CallEvents.InfoReceived | CallEvents.MessageReceived | CallEvents.ProgressToneStart | CallEvents.ProgressToneStop | CallEvents.TransferComplete | CallEvents.TransferFailed; - type VoxImplantIMEvent = IMEvents.ChatHistoryReceived | IMEvents.ChatRoomBanList | - IMEvents.ChatRoomCreated | IMEvents.ChatRoomError | IMEvents.ChatRoomHistoryReceived | - IMEvents.ChatRoomInfo | IMEvents.ChatRoomInvitation | IMEvents.ChatRoomInviteDeclined | - IMEvents.ChatRoomMessageModified | IMEvents.ChatRoomMessageNotModified | IMEvents.ChatRoomMessageReceived | - IMEvents.ChatRoomMessageRemoved | IMEvents.ChatRoomNewParticipant | IMEvents.ChatRoomOperation | - IMEvents.ChatRoomParticipantExit | IMEvents.ChatRoomParticipants | IMEvents.ChatRoomPresenceUpdate | - IMEvents.ChatRoomStateUpdate | IMEvents.ChatRoomSubjectChange | IMEvents.ChatRoomsDataReceived | - IMEvents.ChatStateUpdate | IMEvents.MessageModified | IMEvents.MessageNotModified | - IMEvents.MessageReceived | IMEvents.MessageRemoved | IMEvents.MessageStatus | - IMEvents.PresenceUpdate | IMEvents.RosterItemChange | IMEvents.RosterPresenceUpdate | - IMEvents.RosterReceived | IMEvents.SubscriptionRequest | IMEvents.SystemError | + type VoxImplantIMEvent = IMEvents.ChatHistoryReceived | IMEvents.ChatRoomBanList | + IMEvents.ChatRoomCreated | IMEvents.ChatRoomError | IMEvents.ChatRoomHistoryReceived | + IMEvents.ChatRoomInfo | IMEvents.ChatRoomInvitation | IMEvents.ChatRoomInviteDeclined | + IMEvents.ChatRoomMessageModified | IMEvents.ChatRoomMessageNotModified | IMEvents.ChatRoomMessageReceived | + IMEvents.ChatRoomMessageRemoved | IMEvents.ChatRoomNewParticipant | IMEvents.ChatRoomOperation | + IMEvents.ChatRoomParticipantExit | IMEvents.ChatRoomParticipants | IMEvents.ChatRoomPresenceUpdate | + IMEvents.ChatRoomStateUpdate | IMEvents.ChatRoomSubjectChange | IMEvents.ChatRoomsDataReceived | + IMEvents.ChatStateUpdate | IMEvents.MessageModified | IMEvents.MessageNotModified | + IMEvents.MessageReceived | IMEvents.MessageRemoved | IMEvents.MessageStatus | + IMEvents.PresenceUpdate | IMEvents.RosterItemChange | IMEvents.RosterPresenceUpdate | + IMEvents.RosterReceived | IMEvents.SubscriptionRequest | IMEvents.SystemError | IMEvents.UCConnected | IMEvents.UCDisconnected; /** @@ -1115,23 +1115,23 @@ declare namespace VoxImplant { } enum ChatStateType { - /** - * User is actively participating in the chat session + /** + * User is actively participating in the chat session */ Active, - /** + /** * User is composing a message */ Composing, - /** + /** * User has effectively ended their participation in the chat session */ Gone, - /** + /** * User has not been actively participating in the chat session */ Inactive, - /** + /** * Invalid type */ Invalid, @@ -1488,7 +1488,7 @@ declare namespace VoxImplant { * @param direction False/true to get messages older/newer than the message with specified id * @param count Number of messages */ - getInstantMessagingHistory(user_id: string, message_id?: string, direction?: boolean, count?: number): void; + getInstantMessagingHistory(user_id: string, message_id?: string, direction?: boolean, count?: number): void; /** * Initialize SDK. SDKReady event will be dispatched after succesful SDK initialization. SDK can't be used until it's initialized * @@ -1524,25 +1524,25 @@ declare namespace VoxImplant { /** * Login into application * - * @param username + * @param username * @param password - * @param options Login options + * @param options Login options */ login(username: string, password: string, options?: LoginOptions): void; /** * Login into application using 'code' auth method * - * @param username + * @param username * @param code - * @param options Login options + * @param options Login options */ loginWithCode(username: string, code: string, options?: LoginOptions): void; /** * Login into application using 'onetimekey' auth method * - * @param username + * @param username * @param hash - * @param options Login options + * @param options Login options */ loginWithOneTimeKey(username: string, hash: string, options?: LoginOptions): void; /** @@ -1700,7 +1700,7 @@ declare namespace VoxImplant { setPresenceStatus(status: UserStatuses, msg: string): void; /** * Set background color of flash app (only for Flash mode) - * + * * @param color Color in web format (i.e. #000000 for black) */ setSwfColor(color: string): void; @@ -1720,7 +1720,7 @@ declare namespace VoxImplant { setVideoSettings(settings: VideoSettings | FlashVideoSettings, successCallback?: () => any, failedCallback?: () => any): void; /** * Show flash settings panel - * + * * @param panel Settings type - default/microphone/camera/etc as described in SecurityPanel class */ showFlashSettingsPanel(panel?: string): void; @@ -1782,18 +1782,18 @@ declare namespace VoxImplant { * @param eventName Event name * @param eventHandler Handler function. A single parameter is passed - object with the event information */ - addEventListener(eventName: VoxImplant.CallEvents, eventHandler: (eventObject: VoxImplantCallEvent) => any): void; + addEventListener(eventName: VoxImplant.CallEvents, eventHandler: (eventObject: VoxImplantCallEvent) => any): void; /** * Answer on incoming call * * @param customData Set custom string associated with call session. It can be later obtained from Call History using HTTP API - * @param extraHeaders Optional custom parameters (SIP headers) that should be sent after accepting incoming call. Parameter names must start with "X-" to be processed by application + * @param extraHeaders Optional custom parameters (SIP headers) that should be sent after accepting incoming call. Parameter names must start with "X-" to be processed by application */ answer(customData?: string, extraHeaders?: Object): void; /** * Reject incoming call * - * @param extraHeaders Optional custom parameters (SIP headers) that should be sent after accepting incoming call. Parameter names must start with "X-" to be processed by application + * @param extraHeaders Optional custom parameters (SIP headers) that should be sent after accepting incoming call. Parameter names must start with "X-" to be processed by application */ decline(extraHeaders?: Object): void; /** @@ -1944,7 +1944,7 @@ declare namespace VoxImplant { /** * Optional constraints object */ - optional?: Object; + optional?: Object; } /** @@ -2029,7 +2029,7 @@ declare namespace VoxImplant { * VoxImplant Web SDK lib version */ function version(): String; - + } declare module "voximplant-websdk" { diff --git a/vso-node-api/vso-node-api-tests.ts b/vso-node-api/vso-node-api-tests.ts index d362487cc..b2c188047 100644 --- a/vso-node-api/vso-node-api-tests.ts +++ b/vso-node-api/vso-node-api-tests.ts @@ -22,7 +22,7 @@ test_apis(); function test_apis() { var webapi: webapim.WebApi = new webapim.WebApi('http://serverfoobar.com', webapim.getBasicHandler('fooser', 'barssword')); - + var buildapi: buildm.IBuildApi = webapi.getBuildApi(); var qbuildapi: buildm.IQBuildApi = webapi.getQBuildApi(); var coreapi: corem.ICoreApi = webapi.getCoreApi(); @@ -43,14 +43,14 @@ function test_apis() { var qtfvcapi: tfvcm.IQTfvcApi = webapi.getQTfvcApi(); var witapi: workitemtrackingm.IWorkItemTrackingApi = webapi.getWorkItemTrackingApi(); var qwitapi: workitemtrackingm.IQWorkItemTrackingApi = webapi.getQWorkItemTrackingApi(); - + var apis: basem.ClientApiBase[] = [buildapi, coreapi, filecontainerapi, galleryapi, gitapi, taskapi, agentapi, testapi, tfvcapi, witapi]; var qapis: basem.QClientApiBase[] = [qbuildapi, qcoreapi, qfilecontainerapi, qgalleryapi, qgitapi, qtaskapi, qagentapi, qtestapi, qtfvcapi, qwitapi]; - + for(var api in apis) { console.log('API user agent name: ' + api.userAgent); } for(var qapi in qapis) { console.log('Q API user agent name: ' + qapi.api.userAgent); } -} \ No newline at end of file +} diff --git a/vue/vue-tests.ts b/vue/vue-tests.ts index 03c3e684f..d16bc0104 100644 --- a/vue/vue-tests.ts +++ b/vue/vue-tests.ts @@ -126,7 +126,7 @@ namespace TestInstanceProperty { namespace TestInscanceMethods { "use strict"; - + var vm = new Vue({el: '#app'}); vm.$watch('a.b.c', function(newVal: string, oldVal: number) {}); vm.$watch(function() {return this.a + this.b}, function(newVal: string, oldVal: string) {}); @@ -141,7 +141,7 @@ namespace TestInscanceMethods { s = vm.$interpolate('{{msg}} world!'); vm.$log(); vm.$log('item'); - + vm .$on('test', (msg: any) => {}) .$once('testOnce', (msg: any) => {}) @@ -149,13 +149,13 @@ namespace TestInscanceMethods { .$emit("event", 1, 2) .$dispatch("event", 1, 2, 3) .$broadcast("event", 1, 2, 3, 4) - + .$appendTo(document.createElement("div"), () => {}) .$before('#app', () => {}) .$after(document.getElementById('app')) .$remove(() => {}) .$nextTick(() => {}); - + vm .$mount('#app') .$destroy(false); @@ -163,7 +163,7 @@ namespace TestInscanceMethods { namespace TestVueUtil { "use strict"; - + var _ = Vue.util; var target = document.createElement('div'); var child = document.createElement('div'); diff --git a/vue/vue.d.ts b/vue/vue.d.ts index 650c8d98c..2696e3247 100644 --- a/vue/vue.d.ts +++ b/vue/vue.d.ts @@ -17,18 +17,18 @@ declare namespace vuejs { twoWay?: boolean; validator?(value: any): boolean; } - + interface ComputedOption { get(): any; set(value: any): void; } - + interface WatchOption { handler(val: any, oldVal: any): void; deep?: boolean; immidiate?: boolean; } - + interface DirectiveOption { bind?(): any; update?(newVal?: any, oldVal?: any): any; @@ -40,12 +40,12 @@ declare namespace vuejs { priority?: number; [key: string]: any; } - + interface FilterOption { read: Function; write: Function; } - + interface TransitionOption { css?: boolean; beforeEnter?(el: HTMLElement): void; @@ -58,7 +58,7 @@ declare namespace vuejs { leaveCancelled?(el: HTMLElement): void; stagger?(index: number): number; } - + interface ComponentOption { data?: {[key: string]: any } | Function; props?: string[] | { [key: string]: PropOption }; @@ -89,7 +89,7 @@ declare namespace vuejs { name?: string; [key: string]: any; } - + // instance/api/data.js interface $get { ( exp: string, asStatement?: boolean ): any; } interface $set { ( key: string | number, value: T ): T; } @@ -116,7 +116,7 @@ declare namespace vuejs { interface $mount { ( elementOrSelector?: ( HTMLElement | string ) ): V; } interface $destroy { (remove?: boolean): void; } interface $compile { (el: Element | DocumentFragment, host?: Vue): Function; } - + interface Vue { $data?: any; $el?: HTMLElement; @@ -126,7 +126,7 @@ declare namespace vuejs { $children?: Vue[]; $refs?: Object; $els?: Object; - + $get?: $get; $set?: $set; $delete?: $delete; @@ -148,10 +148,10 @@ declare namespace vuejs { $mount?: $mount; $destroy?: $destroy; $compile?: $compile; - + _init(options?: ComponentOption): void; } - + interface VueConfig { debug: boolean; delimiters: [string, string]; @@ -160,7 +160,7 @@ declare namespace vuejs { async: boolean; convertAllProperties: boolean; } - + interface VueUtil { // util/lang.js set(obj: Object, key: string, value: any): void; @@ -231,7 +231,7 @@ declare namespace vuejs { // observer/index.js defineReactive(obj: Object, key: string, val: any): void; } - + // instance/api/global.js interface VueStatic { new(options?: ComponentOption): Vue; @@ -241,13 +241,13 @@ declare namespace vuejs { set(object: Object, key: string, value: any): void; delete(object: Object, key: string): void; nextTick(callback: Function): any; - + cid: number; - + extend(options?: ComponentOption): VueStatic; use(callback: Function | {install: Function, [key: string]: any}, option?: Object): VueStatic; mixin(mixin: Object): void; - + directive(id: string, definition: T): T; directive(id: string): any; elementDirective(id: string, definition: T): T;