From 5b52dd6dc9b261bc0e84b70a244b39fdc31dd324 Mon Sep 17 00:00:00 2001 From: Richard Hepburn Date: Wed, 21 Aug 2013 15:49:58 -0400 Subject: [PATCH 01/12] Fixed the KnockoutExtenders interface definition The TS 0.9.1.1 compiler was complaining that the throttle property was missing a generic type argument. --- knockout/knockout.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knockout/knockout.d.ts b/knockout/knockout.d.ts index 5b1bdd63f..1124780e6 100644 --- a/knockout/knockout.d.ts +++ b/knockout/knockout.d.ts @@ -188,7 +188,7 @@ interface KnockoutVirtualElements { } interface KnockoutExtenders { - throttle(target: any, timeout: number): KnockoutComputed; + throttle(target: any, timeout: number): KnockoutComputed; notify(target: any, notifyWhen: string): any; } From e4cfb3a842824c1ff21077d08dc1c1e201d00338 Mon Sep 17 00:00:00 2001 From: Derek Cicerone Date: Wed, 21 Aug 2013 17:08:45 -0400 Subject: [PATCH 02/12] Fix breaks identified by TypeScript 0.9.1.1 --- underscore/underscore.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/underscore/underscore.d.ts b/underscore/underscore.d.ts index 7c92ca007..499b390a3 100644 --- a/underscore/underscore.d.ts +++ b/underscore/underscore.d.ts @@ -1310,7 +1310,7 @@ declare module _ { * @param obj Object to chain. * @return Wrapped `obj`. **/ - export function chain(obj: any): _Chain; + export function chain(obj: any): _Chain; /** * Extracts the value of a wrapped object. @@ -2077,7 +2077,7 @@ declare class _ { * Wrapped type `any`. * @see _.chain **/ - chain(): _Chain; + chain(): _Chain; /** * Wrapped type `any`. @@ -2096,7 +2096,7 @@ interface _Chain { * Wrapped type `any[]`. * @see _.each **/ - each(iterator: _.ListIterator, context?: any): _Chain; + each(iterator: _.ListIterator, context?: any): _Chain; /** * @see _.each From 49d1f544463df73f6d5a77cd75eaedb5882eb80d Mon Sep 17 00:00:00 2001 From: basarat Date: Thu, 22 Aug 2013 22:56:31 +1000 Subject: [PATCH 03/12] All generic parameter must be provided in latest typescript release http://stackoverflow.com/a/18381029/390330 --- jquery/jquery.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery/jquery.d.ts b/jquery/jquery.d.ts index 2ef4bb580..e59528019 100644 --- a/jquery/jquery.d.ts +++ b/jquery/jquery.d.ts @@ -488,7 +488,7 @@ interface JQuery { removeData(nameOrList?: any): JQuery; // Deferred - promise(type?: any, target?: any): JQueryPromise; + promise(type?: any, target?: any): JQueryPromise; // Effects animate(properties: any, duration?: any, complete?: Function): JQuery; From a754abfe3cab28f6fdfb2d618346dae1ec5a404b Mon Sep 17 00:00:00 2001 From: Pedro Casaubon Date: Thu, 22 Aug 2013 17:35:14 +0200 Subject: [PATCH 04/12] Added PixiJS def files --- .gitignore | 22 + README.md | 1 + pixi/pixi-tests.ts | 1190 ++++++++++++++++++++++++++++++++++++++++++++ pixi/pixi.d.ts | 447 +++++++++++++++++ pixi/webgl.d.ts | 534 ++++++++++++++++++++ 5 files changed, 2194 insertions(+) create mode 100644 pixi/pixi-tests.ts create mode 100644 pixi/pixi.d.ts create mode 100644 pixi/webgl.d.ts diff --git a/.gitignore b/.gitignore index a111d5647..999db3b89 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,25 @@ Properties !_infrastructure/tests/*/*.js !_infrastructure/tests/*/*/*.js !_infrastructure/tests/*/*/*/*.js + +.idea/.name + +.idea/DefinitelyTyped.iml + +.idea/encodings.xml + +.idea/libraries/Generated_files.xml + +.idea/misc.xml + +.idea/modules.xml + +.idea/scopes/scope_settings.xml + +.idea/vcs.xml + +.idea/workspace.xml + +.idea/watcherTasks.xml + +.idea/watcherTasks.xml diff --git a/README.md b/README.md index 3f6874db8..497eff663 100755 --- a/README.md +++ b/README.md @@ -152,6 +152,7 @@ List of Definitions * [Persona](http://www.mozilla.org/en-US/persona) (by [James Frasca](https://github.com/Nycto)) * [PhantomJS](http://phantomjs.org) (by [Jed Hunsaker](https://github.com/jedhunsaker)) * [PhoneGap](http://phonegap.com) (by [Boris Yankov](https://github.com/borisyankov)) +* [PixiJS](https://github.com/GoodBoyDigital/pixi.js) (by [Pedro Casaubon](https://github.com/xperiments)) * [Platform](https://github.com/bestiejs/platform.js) (by [Jake Hickman](https://github.com/JakeH)) * [PouchDB](http://pouchdb.com) (by [Bill Sears](https://github.com/MrBigDog2U/)) * [PreloadJS](http://www.createjs.com/#!/PreloadJS) (by [Pedro Ferreira](https://bitbucket.org/drk4)) diff --git a/pixi/pixi-tests.ts b/pixi/pixi-tests.ts new file mode 100644 index 000000000..93ff79593 --- /dev/null +++ b/pixi/pixi-tests.ts @@ -0,0 +1,1190 @@ +/// +/// + + +var stage = new PIXI.Stage(0xFFFFFF, true); + +stage.interactive = true; + +var bg = PIXI.Sprite.fromImage("BGrotate.jpg"); +bg.anchor.x = 0.5; +bg.anchor.y = 0.5; + +bg.position.x = 620/2; +bg.position.y = 380/2; + +stage.addChild(bg); + +var container = new PIXI.DisplayObjectContainer(); +container.position.x = 620/2; +container.position.y = 380/2; + +var bgFront = PIXI.Sprite.fromImage("SceneRotate.jpg"); +bgFront.anchor.x = 0.5; +bgFront.anchor.y = 0.5; + +container.addChild(bgFront); + +var light2 = PIXI.Sprite.fromImage("LightRotate2.png"); +light2.anchor.x = 0.5; +light2.anchor.y = 0.5; +container.addChild(light2); + +var light1 = PIXI.Sprite.fromImage("LightRotate1.png"); +light1.anchor.x = 0.5; +light1.anchor.y = 0.5; +container.addChild(light1); + +var panda = PIXI.Sprite.fromImage("panda.png"); +panda.anchor.x = 0.5; +panda.anchor.y = 0.5; + +container.addChild(panda); + +stage.addChild(container); + +// create a renderer instance +var renderer = PIXI.autoDetectRenderer(620, 380); + +renderer.view.style.position = "absolute" +renderer.view.style.marginLeft = "-310px"; +renderer.view.style.marginTop = "-190px"; +renderer.view.style.top = "50%"; +renderer.view.style.left = "50%"; +renderer.view.style.display = "block"; + +// add render view to DOM +document.body.appendChild(renderer.view); + +// lets create moving shape +var thing = new PIXI.Graphics(); +stage.addChild(thing); +thing.position.x = 620/2; +thing.position.y = 380/2; +thing.lineStyle(0); + +container.mask = thing; + +var count = 0; + +stage.click = stage.tap = function() +{ + if(!container.filter) + { + container.mask = thing; + PIXI.runList(stage); + } + else + { + container.mask = null; + } +} + +/* + * Add a pixi Logo! + */ +var logo = PIXI.Sprite.fromImage("../../logo_small.png") +stage.addChild(logo); + +logo.anchor.x = 1; +logo.position.x = 620 +logo.scale.x = logo.scale.y = 0.5; +logo.position.y = 320 +logo.interactive = true; +logo.buttonMode = true; + +logo.click = logo.tap = function() +{ + window.open("https://github.com/GoodBoyDigital/pixi.js", "_blank") +} + +var help = new PIXI.Text("Click to turn masking on / off.", {font:"bold 12pt Arial", fill:"white"}); +help.position.y = 350; +help.position.x = 10; +stage.addChild(help); + +requestAnimFrame(animate); + +function animate() { + + bg.rotation += 0.01; + bgFront.rotation -= 0.01; + + light1.rotation += 0.02; + light2.rotation += 0.01; + + panda.scale.x = 1 + Math.sin(count) * 0.04; + panda.scale.y = 1 + Math.cos(count) * 0.04; + + count += 0.1; + + thing.clear(); + thing.lineStyle(5, 0x16f1ff, 1); + thing.beginFill(0x8bc5ff, 0.4); + thing.moveTo(-120 + Math.sin(count) * 20, -100 + Math.cos(count)* 20); + thing.lineTo(120 + Math.cos(count) * 20, -100 + Math.sin(count)* 20); + thing.lineTo(120 + Math.sin(count) * 20, 100 + Math.cos(count)* 20); + thing.lineTo(-120 + Math.cos(count)* 20, 100 + Math.sin(count)* 20); + thing.lineTo(-120 + Math.sin(count) * 20, -100 + Math.cos(count)* 20); + thing.rotation = count * 0.1; + + renderer.render(stage); + requestAnimFrame( animate ); +} + +/* 13 */ + +// create an new instance of a pixi stage +var stage = new PIXI.Stage(0xFFFFFF, true); + +stage.setInteractive(true); + +var sprite= PIXI.Sprite.fromImage("spinObj_02.png"); +//stage.addChild(sprite); +// create a renderer instance +// the 5the parameter is the anti aliasing +var renderer = PIXI.autoDetectRenderer(620, 380, null, false, true); + +// set the canvas width and height to fill the screen +//renderer.view.style.width = window.innerWidth + "px"; +//renderer.view.style.height = window.innerHeight + "px"; +renderer.view.style.display = "block"; + +// add render view to DOM +document.body.appendChild(renderer.view); + +var graphics = new PIXI.Graphics(); + + +// set a fill and line style +graphics.beginFill(0xFF3300); +graphics.lineStyle(10, 0xffd900, 1); + +// draw a shape +graphics.moveTo(50,50); +graphics.lineTo(250, 50); +graphics.lineTo(100, 100); +graphics.lineTo(250, 220); +graphics.lineTo(50, 220); +graphics.lineTo(50, 50); +graphics.endFill(); + +// set a fill and line style again +graphics.lineStyle(10, 0xFF0000, 0.8); +graphics.beginFill(0xFF700B, 1); + +// draw a second shape +graphics.moveTo(210,300); +graphics.lineTo(450,320); +graphics.lineTo(570,350); +graphics.lineTo(580,20); +graphics.lineTo(330,120); +graphics.lineTo(410,200); +graphics.lineTo(210,300); +graphics.endFill(); + +// draw a rectangel +graphics.lineStyle(2, 0x0000FF, 1); +graphics.drawRect(50, 250, 100, 100); + +// draw a circle +graphics.lineStyle(0); +graphics.beginFill(0xFFFF0B, 0.5); +graphics.drawCircle(470, 200,100); + +graphics.lineStyle(20, 0x33FF00); +graphics.moveTo(30,30); +graphics.lineTo(600, 300); + + +stage.addChild(graphics); + +// lets create moving shape +var thing = new PIXI.Graphics(); +stage.addChild(thing); +thing.position.x = 620/2; +thing.position.y = 380/2; + +var count = 0; + +stage.click = stage.tap = function() +{ + graphics.lineStyle(Math.random() * 30, Math.random() * 0xFFFFFF, 1); + graphics.moveTo(Math.random() * 620,Math.random() * 380); + graphics.lineTo(Math.random() * 620,Math.random() * 380); +} + +requestAnimFrame(animate); + +function animate1() { + + thing.clear(); + + count += 0.1; + + thing.clear(); + thing.lineStyle(30, 0xff0000, 1); + thing.beginFill(0xffFF00, 0.5); + + thing.moveTo(-120 + Math.sin(count) * 20, -100 + Math.cos(count)* 20); + thing.lineTo(120 + Math.cos(count) * 20, -100 + Math.sin(count)* 20); + thing.lineTo(120 + Math.sin(count) * 20, 100 + Math.cos(count)* 20); + thing.lineTo(-120 + Math.cos(count)* 20, 100 + Math.sin(count)* 20); + thing.lineTo(-120 + Math.sin(count) * 20, -100 + Math.cos(count)* 20); + + thing.rotation = count * 0.1; + renderer.render(stage); + requestAnimFrame( animate ); +} + + +// create an new instance of a pixi stage +var stage = new PIXI.Stage(0x000000); + +// create a renderer instance +var renderer = PIXI.autoDetectRenderer(800, 600); + +// set the canvas width and height to fill the screen +renderer.view.style.width = window.innerWidth + "px"; +renderer.view.style.height = window.innerHeight + "px"; +renderer.view.style.display = "block"; + +// add render view to DOM +document.body.appendChild(renderer.view); + +// OOH! SHINY! +// create two render textures.. these dynamic textures will be used to draw the scene into itself +var renderTexture = new PIXI.RenderTexture(800, 600); +var renderTexture2 = new PIXI.RenderTexture(800, 600); +var currentTexture = renderTexture; + +// create a new sprite that uses the render texture we created above +var outputSprite = new PIXI.Sprite(currentTexture); + +// align the sprite +outputSprite.position.x = 800/2; +outputSprite.position.y = 600/2; +outputSprite.anchor.x = 0.5; +outputSprite.anchor.y = 0.5; + +// add to stage +stage.addChild(outputSprite); + +var stuffContainer = new PIXI.DisplayObjectContainer(); + +stuffContainer.position.x = 800/2; +stuffContainer.position.y = 600/2 + +stage.addChild(stuffContainer); + +// create an array of image ids.. +var fruits = ["spinObj_01.png", "spinObj_02.png", + "spinObj_03.png", "spinObj_04.png", + "spinObj_05.png", "spinObj_06.png", + "spinObj_07.png", "spinObj_08.png"]; + +// create an array of items +var items = []; + +// now create some items and randomly position them in the stuff container +for (var i=0; i < 20; i++) +{ + var item = PIXI.Sprite.fromImage(fruits[i % fruits.length]); + item.position.x = Math.random() * 400 - 200; + item.position.y = Math.random() * 400 - 200; + + item.anchor.x = 0.5; + item.anchor.y = 0.5; + + stuffContainer.addChild(item); + console.log("_") + items.push(item); +}; + +// used for spinning! +var count = 0; + + +requestAnimFrame(animate); + +function animate2() { + + requestAnimFrame( animate ); + + for (var i=0; i < items.length; i++) + { + // rotate each item + var item = items[i]; + item.rotation += 0.1; + }; + + count += 0.01; + + // swap the buffers.. + var temp = renderTexture; + renderTexture = renderTexture2; + renderTexture2 = temp; + + + // set the new texture + outputSprite.setTexture(renderTexture); + + // twist this up! + stuffContainer.rotation -= 0.01 + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + + // render the stage to the texture + // the true clears the texture before content is rendered + renderTexture2.render(stage, new PIXI.Point(0,0), true); + + // and finally render the stage + renderer.render(stage); +} + + +//// + + + +function init() +{ + var assetsToLoader = ["desyrel.fnt"]; + + // create a new loader + var loader = new PIXI.AssetLoader(assetsToLoader); + + // use callback + loader.onComplete = onAssetsLoaded; + + //begin load + + // create an new instance of a pixi stage + var stage = new PIXI.Stage(0x66FF99); + + loader.load(); + function onAssetsLoaded() + { + var bitmapFontText = new PIXI.BitmapText("bitmap fonts are\n now supported!", {font: "35px Desyrel", align: "right"}); + bitmapFontText.position.x = 620 - bitmapFontText.width - 20; + bitmapFontText.position.y = 20; + + PIXI.runList(bitmapFontText) + stage.addChild(bitmapFontText); + + + } + + + + // add a shiney background.. + var background = PIXI.Sprite.fromImage("textDemoBG.jpg"); + stage.addChild(background); + + // create a renderer instance + var renderer = PIXI.autoDetectRenderer(620, 400); + // add the renderer view element to the DOM + document.body.appendChild(renderer.view); + + requestAnimFrame(animate); + + // create some white text using the Snippet webfont + var textSample = new PIXI.Text("Pixi.js can has\nmultiline text!", {font: "35px Snippet", fill: "white", align: "left"}); + textSample.position.x = 20; + textSample.position.y = 20; + + // create a text object with a nice stroke + var spinningText = new PIXI.Text("I'm fun!", {font: "bold 60px Podkova", fill: "#cc00ff", align: "center", stroke: "#FFFFFF", strokeThickness: 6}); + // setting the anchor point to 0.5 will center align the text... great for spinning! + spinningText.anchor.x = spinningText.anchor.y = 0.5; + spinningText.position.x = 620 / 2; + spinningText.position.y = 400 / 2; + + // create a text object that will be updated.. + var countingText = new PIXI.Text("COUNT 4EVAR: 0", {font: "bold italic 60px Arvo", fill: "#3e1707", align: "center", stroke: "#a4410e", strokeThickness: 7}); + countingText.position.x = 620 / 2; + countingText.position.y = 320; + countingText.anchor.x = 0.5; + + stage.addChild(textSample); + stage.addChild(spinningText); + stage.addChild(countingText); + + var count = 0; + var score = 0; + + function animate() { + + requestAnimFrame( animate ); + count++; + if(count == 50) + { + count = 0; + score++; + // update the text... + countingText.setText("COUNT 4EVAR: " + score); + + } + // just for fun, lets rotate the text + spinningText.rotation += 0.03; + + // render the stage + renderer.render(stage); + } +} + + +///// + + + +// create an new instance of a pixi stage +var stage = new PIXI.Stage(0x97c56e, true); + +// create a renderer instance +var renderer = PIXI.autoDetectRenderer(window.innerWidth, window.innerHeight, null); + +// add the renderer view element to the DOM +document.body.appendChild(renderer.view); +renderer.view.style.position = "absolute"; +renderer.view.style.top = "0px"; +renderer.view.style.left = "0px"; +requestAnimFrame( animate ); + +// create a texture from an image path +var texture = PIXI.Texture.fromImage("p2.jpeg"); + +// create a tiling sprite.. +// requires a texture, width and height +// to work in webGL the texture size must be a power of two +var tilingSprite = new PIXI.TilingSprite(texture, window.innerWidth, window.innerHeight) + +var count = 0; + +stage.addChild(tilingSprite); + +function animate33() { + + requestAnimFrame( animate ); + + + count += 0.005 + tilingSprite.tileScale.x = 2 + Math.sin(count); + tilingSprite.tileScale.y = 2 + Math.cos(count); + + tilingSprite.tilePosition.x += 1; + tilingSprite.tilePosition.y += 1; + + // just for fun, lets rotate mr rabbit a little + //stage.interactionManager.update(); + // render the stage + renderer.render(stage); +} + + + +///// + + +// create an new instance of a pixi stage +var stage = new PIXI.Stage(0x97c56e, true); + +// create a renderer instance +var renderer = PIXI.autoDetectRenderer(window.innerWidth, window.innerHeight, null); + +// add the renderer view element to the DOM +document.body.appendChild(renderer.view); +renderer.view.style.position = "absolute"; +renderer.view.style.top = "0px"; +renderer.view.style.left = "0px"; +requestAnimFrame( animate ); + +// create a texture from an image path +var texture = PIXI.Texture.fromImage("bunny.png"); + +for (var i=0; i < 10; i++) +{ + createBunny(Math.random() * window.innerWidth, Math.random() * window.innerHeight) +}; + + +function createBunny(x, y) +{ + // create our little bunny friend.. + var bunny = new PIXI.Sprite(texture); + // bunny.width = 300; + // enable the bunny to be interactive.. this will allow it to respond to mouse and touch events + bunny.interactive = true; + // this button mode will mean the hand cursor appears when you rollover the bunny with your mouse + bunny.buttonMode = true; + + // center the bunnys anchor point + bunny.anchor.x = 0.5; + bunny.anchor.y = 0.5; + // make it a bit bigger, so its easier to touch + bunny.scale.x = bunny.scale.y = 3; + + + // use the mousedown and touchstart + bunny.mousedown = bunny.touchstart = function(data) + { + // stop the default event... + data.originalEvent.preventDefault(); + + // store a refference to the data + // The reason for this is because of multitouch + // we want to track the movement of this particular touch + this.data = data; + this.alpha = 0.9; + this.dragging = true; + }; + + // set the events for when the mouse is released or a touch is released + bunny.mouseup = bunny.mouseupoutside = bunny.touchend = bunny.touchendoutside = function(data) + { + this.alpha = 1 + this.dragging = false; + // set the interaction data to null + this.data = null; + }; + + // set the callbacks for when the mouse or a touch moves + bunny.mousemove = bunny.touchmove = function(data) + { + if(this.dragging) + { + // need to get parent coords.. + var newPosition = this.data.getLocalPosition(this.parent); + this.position.x = newPosition.x; + this.position.y = newPosition.y; + } + } + + // move the sprite to its designated position + bunny.position.x = x; + bunny.position.y = y; + + // add it to the stage + stage.addChild(bunny); +} + +function animate44() { + + requestAnimFrame( animate ); + + // just for fun, lets rotate mr rabbit a little + //stage.interactionManager.update(); + // render the stage + renderer.render(stage); +} + + + +//// + +// create an new instance of a pixi stage +var stage = new PIXI.Stage(0x66FF99); + +// create a renderer instance +var renderer = PIXI.autoDetectRenderer(400, 300, null, true); + +// add the renderer view element to the DOM +document.body.appendChild(renderer.view); +renderer.view.style.position = "absolute"; +renderer.view.style.top = "0px"; +renderer.view.style.left = "0px"; +requestAnimFrame( animate ); + +// create a texture from an image path +var texture = PIXI.Texture.fromImage("bunny.png"); +// create a new Sprite using the texture +var bunny = new PIXI.Sprite(texture); + +// center the sprites anchor point +bunny.anchor.x = 0.5; +bunny.anchor.y = 0.5; + +// move the sprite t the center of the screen +bunny.position.x = 200; +bunny.position.y = 150; + +stage.addChild(bunny); + +function animate55() { + + requestAnimFrame( animate ); + + // just for fun, lets rotate mr rabbit a little + bunny.rotation += 0.1; + + // render the stage + renderer.render(stage); +} + + + +/////// + + + +// create an new instance of a pixi stage +// the second parameter is interactivity... +var interactive = true; +var stage = new PIXI.Stage(0x000000, interactive); + +// create a renderer instance. +var renderer = PIXI.autoDetectRenderer(620, 400); + +// add the renderer view element to the DOM +document.body.appendChild(renderer.view); + +requestAnimFrame( animate ); + +// create a background.. +var background = PIXI.Sprite.fromImage("button_test_BG.jpg"); + +// add background to stage.. +stage.addChild(background); + +// create some textures from an image path +var textureButton = PIXI.Texture.fromImage("button.png"); +var textureButtonDown = PIXI.Texture.fromImage("buttonDown.png"); +var textureButtonOver = PIXI.Texture.fromImage("buttonOver.png"); + +var buttons = []; + +var buttonPositions = [175,75, + 600-145, 75, + 600/2 - 20, 400/2 + 10, + 175, 400-75, + 600-115, 400-95]; + + +for (var i=0; i < 5; i++) +{ + var button = new PIXI.Sprite(textureButton); + button.buttonMode = true; + + button.anchor.x = 0.5; + button.anchor.y = 0.5; + + button.position.x = buttonPositions[i*2]; + button.position.y = buttonPositions[i*2 + 1]; + + // make the button interactive.. + button.interactive = true; + + // set the mousedown and touchstart callback.. + button.mousedown = button.touchstart = function(data){ + + this.isdown = true; + this.setTexture(textureButtonDown); + this.alpha = 1; + } + + // set the mouseup and touchend callback.. + button.mouseup = button.touchend = button.mouseupoutside = button.touchendoutside = function(data){ + this.isdown = false; + + if(this.isOver) + { + this.setTexture(textureButtonOver); + } + else + { + this.setTexture(textureButton); + } + } + + // set the mouseover callback.. + button.mouseover = function(data){ + + this.isOver = true; + + if(this.isdown)return + + this.setTexture(textureButtonOver) + } + + // set the mouseout callback.. + button.mouseout = function(data){ + + this.isOver = false; + if(this.isdown)return + this.setTexture(textureButton) + } + + button.click = function(data){ + // click! + console.log("CLICK!"); + // alert("CLICK!") + } + + button.tap = function(data){ + // click! + console.log("TAP!!"); + //this.alpha = 0.5; + } + + // add it to the stage + stage.addChild(button); + + // add button to array + buttons.push(button); +}; + +// set some silly values.. + +buttons[0].scale.x = 1.2; + +buttons[1].scale.y = 1.2; + +buttons[2].rotation = Math.PI/10; + +buttons[3].scale.x = 0.8; +buttons[3].scale.y = 0.8; + +buttons[4].scale.x = 0.8; +buttons[4].scale.y = 1.2; +buttons[4].rotation = Math.PI; +// var button1 = +function animate66() { + + requestAnimFrame( animate ); + // render the stage + + // do a test.. + + renderer.render(stage); +} + +// add a logo! +var pixiLogo = PIXI.Sprite.fromImage("pixi.png"); +stage.addChild(pixiLogo); + +pixiLogo.position.x = 620 - 56; +pixiLogo.position.y = 400- 32; + +pixiLogo.setInteractive(true); + +pixiLogo.click = pixiLogo.tap = function(){ + + var win=window.open("https://github.com/GoodBoyDigital/pixi.js", '_blank'); + +} + + +////// + + + +var w = 1024; +var h = 768; + +var n = 2000; +var d = 1; +var current = 1; +var objs = 17; +var vx = 0; +var vy = 0; +var vz = 0; +var points1 = []; +var points2 = []; +var points3 = []; +var tpoint1 = []; +var tpoint2 = []; +var tpoint3 = []; +var balls = []; + +function start() { + + var ballTexture = PIXI.Texture.fromImage("assets/pixel.png"); + + renderer = PIXI.autoDetectRenderer(w, h); + + stage = new PIXI.Stage(0x000000); + + document.body.appendChild(renderer.view); + + makeObject(0); + + for (var i = 0; i < n; i++) + { + tpoint1[i] = points1[i]; + tpoint2[i] = points2[i]; + tpoint3[i] = points3[i]; + + var tempBall = new PIXI.Sprite(ballTexture); + tempBall.anchor.x = 0.5; + tempBall.anchor.y = 0.5; + tempBall.alpha = 0.5; + balls[i] = tempBall; + + stage.addChild(tempBall); + } + + + + setTimeout(nextObject, 5000); + + requestAnimFrame(update); + +} + +function nextObject () { + + current++; + + if (current > objs) + { + current = 0; + } + + makeObject(current); + + setTimeout(nextObject, 8000); + +} + +function makeObject ( t ) { + + var xd; + + switch (t) + { + case 0: + + for (var i = 0; i < n; i++) + { + points1[i] = -50 + Math.round(Math.random() * 100); + points2[i] = 0; + points3[i] = 0; + } + break; + + case 1: + + for (var i = 0; i < n; i++) + { + xd = -90 + Math.round(Math.random() * 180); + points1[i] = (Math.cos(xd) * 10) * (Math.cos(t * 360 / n) * 10); + points2[i] = (Math.cos(xd) * 10) * (Math.sin(t * 360 / n) * 10); + points3[i] = Math.sin(xd) * 100; + } + break; + + case 2: + + for (var i = 0; i < n; i++) + { + xd = -90 + Math.round(Math.random() * 180); + points1[i] = (Math.cos(xd) * 10) * (Math.cos(t * 360 / n) * 10); + points2[i] = (Math.cos(xd) * 10) * (Math.sin(t * 360 / n) * 10); + points3[i] = Math.sin(i * 360 / n) * 100; + } + break; + + case 3: + + for (var i = 0; i < n; i++) + { + xd = -90 + Math.round(Math.random() * 180); + points1[i] = (Math.cos(xd) * 10) * (Math.cos(xd) * 10); + points2[i] = (Math.cos(xd) * 10) * (Math.sin(xd) * 10); + points3[i] = Math.sin(xd) * 100; + } + break; + + case 4: + + for (var i = 0; i < n; i++) + { + xd = -90 + Math.round(Math.random() * 180); + points1[i] = (Math.cos(xd) * 10) * (Math.cos(xd) * 10); + points2[i] = (Math.cos(xd) * 10) * (Math.sin(xd) * 10); + points3[i] = Math.sin(i * 360 / n) * 100; + } + break; + + case 5: + + for (var i = 0; i < n; i++) + { + xd = -90 + Math.round(Math.random() * 180); + points1[i] = (Math.cos(xd) * 10) * (Math.cos(xd) * 10); + points2[i] = (Math.cos(i * 360 / n) * 10) * (Math.sin(xd) * 10); + points3[i] = Math.sin(i * 360 / n) * 100; + } + break; + + case 6: + + for (var i = 0; i < n; i++) + { + xd = -90 + Math.round(Math.random() * 180); + points1[i] = (Math.cos(i * 360 / n) * 10) * (Math.cos(i * 360 / n) * 10); + points2[i] = (Math.cos(i * 360 / n) * 10) * (Math.sin(xd) * 10); + points3[i] = Math.sin(i * 360 / n) * 100; + } + break; + + case 7: + + for (var i = 0; i < n; i++) + { + xd = -90 + Math.round(Math.random() * 180); + points1[i] = (Math.cos(i * 360 / n) * 10) * (Math.cos(i * 360 / n) * 10); + points2[i] = (Math.cos(i * 360 / n) * 10) * (Math.sin(i * 360 / n) * 10); + points3[i] = Math.sin(i * 360 / n) * 100; + } + break; + + case 8: + + for (var i = 0; i < n; i++) + { + xd = -90 + Math.round(Math.random() * 180); + points1[i] = (Math.cos(xd) * 10) * (Math.cos(i * 360 / n) * 10); + points2[i] = (Math.cos(i * 360 / n) * 10) * (Math.sin(i * 360 / n) * 10); + points3[i] = Math.sin(xd) * 100; + } + break; + + case 9: + + for (var i = 0; i < n; i++) + { + xd = -90 + Math.round(Math.random() * 180); + points1[i] = (Math.cos(xd) * 10) * (Math.cos(i * 360 / n) * 10); + points2[i] = (Math.cos(i * 360 / n) * 10) * (Math.sin(xd) * 10); + points3[i] = Math.sin(xd) * 100; + } + break; + + case 10: + + for (var i = 0; i < n; i++) + { + xd = -90 + Math.round(Math.random() * 180); + points1[i] = (Math.cos(i * 360 / n) * 10) * (Math.cos(i * 360 / n) * 10); + points2[i] = (Math.cos(xd) * 10) * (Math.sin(xd) * 10); + points3[i] = Math.sin(i * 360 / n) * 100; + } + break; + + case 11: + + for (var i = 0; i < n; i++) + { + xd = -90 + Math.round(Math.random() * 180); + points1[i] = (Math.cos(xd) * 10) * (Math.cos(i * 360 / n) * 10); + points2[i] = (Math.sin(xd) * 10) * (Math.sin(i * 360 / n) * 10); + points3[i] = Math.sin(xd) * 100; + } + break; + + case 12: + + for (var i = 0; i < n; i++) + { + xd = -90 + Math.round(Math.random() * 180); + points1[i] = (Math.cos(xd) * 10) * (Math.cos(xd) * 10); + points2[i] = (Math.sin(xd) * 10) * (Math.sin(xd) * 10); + points3[i] = Math.sin(i * 360 / n) * 100; + } + break; + + case 13: + + for (var i = 0; i < n; i++) + { + xd = -90 + Math.round(Math.random() * 180); + points1[i] = (Math.cos(xd) * 10) * (Math.cos(i * 360 / n) * 10); + points2[i] = (Math.sin(i * 360 / n) * 10) * (Math.sin(xd) * 10); + points3[i] = Math.sin(i * 360 / n) * 100; + } + break; + + case 14: + + for (var i = 0; i < n; i++) + { + xd = -90 + Math.round(Math.random() * 180); + points1[i] = (Math.sin(xd) * 10) * (Math.cos(xd) * 10); + points2[i] = (Math.sin(xd) * 10) * (Math.sin(i * 360 / n) * 10); + points3[i] = Math.sin(i * 360 / n) * 100; + } + break; + + case 15: + + for (var i = 0; i < n; i++) + { + xd = -90 + Math.round(Math.random() * 180); + points1[i] = (Math.cos(i * 360 / n) * 10) * (Math.cos(i * 360 / n) * 10); + points2[i] = (Math.sin(i * 360 / n) * 10) * (Math.sin(xd) * 10); + points3[i] = Math.sin(i * 360 / n) * 100; + } + break; + + case 16: + + for (var i = 0; i < n; i++) + { + xd = -90 + Math.round(Math.random() * 180); + points1[i] = (Math.cos(xd) * 10) * (Math.cos(i * 360 / n) * 10); + points2[i] = (Math.sin(i * 360 / n) * 10) * (Math.sin(xd) * 10); + points3[i] = Math.sin(xd) * 100; + } + break; + + case 17: + + for (var i = 0; i < n; i++) + { + xd = -90 + Math.round(Math.random() * 180); + points1[i] = (Math.cos(xd) * 10) * (Math.cos(xd) * 10); + points2[i] = (Math.cos(i * 360 / n) * 10) * (Math.sin(i * 360 / n) * 10); + points3[i] = Math.sin(i * 360 / n) * 100; + } + break; + } + +} + + + +function update() +{ + var x3d, y3d, z3d, tx, ty, tz, ox; + + if (d < 250) + { + d++; + } + + vx += 0.0075; + vy += 0.0075; + vz += 0.0075; + + for (var i = 0; i < n; i++) + { + if (points1[i] > tpoint1[i]) { tpoint1[i] = tpoint1[i] + 1; } + if (points1[i] < tpoint1[i]) { tpoint1[i] = tpoint1[i] - 1; } + if (points2[i] > tpoint2[i]) { tpoint2[i] = tpoint2[i] + 1; } + if (points2[i] < tpoint2[i]) { tpoint2[i] = tpoint2[i] - 1; } + if (points3[i] > tpoint3[i]) { tpoint3[i] = tpoint3[i] + 1; } + if (points3[i] < tpoint3[i]) { tpoint3[i] = tpoint3[i] - 1; } + + x3d = tpoint1[i]; + y3d = tpoint2[i]; + z3d = tpoint3[i]; + + ty = (y3d * Math.cos(vx)) - (z3d * Math.sin(vx)); + tz = (y3d * Math.sin(vx)) + (z3d * Math.cos(vx)); + tx = (x3d * Math.cos(vy)) - (tz * Math.sin(vy)); + tz = (x3d * Math.sin(vy)) + (tz * Math.cos(vy)); + ox = tx; + tx = (tx * Math.cos(vz)) - (ty * Math.sin(vz)); + ty = (ox * Math.sin(vz)) + (ty * Math.cos(vz)); + + balls[i].position.x = (512 * tx) / (d - tz) + w / 2; + balls[i].position.y = (h/2) - (512 * ty) / (d - tz); + + } + + renderer.render(stage); + + requestAnimFrame(update); +} + + + +/////// + + + +// Globals, globals everywhere and not a drop to drink +var w = 1024; +var h = 768; +var starCount = 2500; +var sx = 1.0 + (Math.random() / 20); +var sy = 1.0 + (Math.random() / 20); +var slideX = w / 2; +var slideY = h / 2; +var stars = []; + +function start2() { + + var ballTexture = PIXI.Texture.fromImage("assets/bubble_32x32.png"); + + renderer = PIXI.autoDetectRenderer(w, h); + + stage = new PIXI.Stage(0x000000); + + document.body.appendChild(renderer.view); + + for (var i = 0; i < starCount; i++) + { + var tempBall = new PIXI.Sprite(ballTexture); + + tempBall.position.x = (Math.random() * w) - slideX; + tempBall.position.y = (Math.random() * h) - slideY; + tempBall.anchor.x = 0.5; + tempBall.anchor.y = 0.5; + + stars.push({ sprite: tempBall, x: tempBall.position.x, y: tempBall.position.y }); + + stage.addChild(tempBall); + } + + document.getElementById('rnd').onclick = newWave; + document.getElementById('sx').innerHTML = 'SX: ' + sx + '
SY: ' + sy; + + + + requestAnimFrame(update); + +} + +function newWave () { + + sx = 1.0 + (Math.random() / 20); + sy = 1.0 + (Math.random() / 20); + document.getElementById('sx').innerHTML = 'SX: ' + sx + '
SY: ' + sy; + +} + + + +function update22() +{ + for (var i = 0; i < starCount; i++) + { + stars[i].sprite.position.x = stars[i].x + slideX; + stars[i].sprite.position.y = stars[i].y + slideY; + stars[i].x = stars[i].x * sx; + stars[i].y = stars[i].y * sy; + + if (stars[i].x > w) + { + stars[i].x = stars[i].x - w; + } + else if (stars[i].x < -w) + { + stars[i].x = stars[i].x + w; + } + + if (stars[i].y > h) + { + stars[i].y = stars[i].y - h; + } + else if (stars[i].y < -h) + { + stars[i].y = stars[i].y + h; + } + } + + renderer.render(stage); + + requestAnimFrame(update); +} diff --git a/pixi/pixi.d.ts b/pixi/pixi.d.ts new file mode 100644 index 000000000..d5daba948 --- /dev/null +++ b/pixi/pixi.d.ts @@ -0,0 +1,447 @@ +// Type definitions for PIXI 1.3 +// Project: https://github.com/GoodBoyDigital/pixi.js/ +// Definitions by: xperiments +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// +declare module PIXI +{ + + /* STATICS */ + export var gl:WebGLRenderingContext; + export var BaseTextureCache: {}; + export var texturesToUpdate: BaseTexture[]; + export var texturesToDestroy: BaseTexture[]; + export var TextureCache: {}; + export var FrameCache: {}; + export var blendModes:{ NORMAL:number; SCREEN:number; }; + + + /* MODULE FUNCTIONS */ + export function autoDetectRenderer(width: number, height: number, view?: HTMLCanvasElement, transparent?: boolean, antialias?: boolean): IPixiRenderer; + export function FilterBlock( mask:Graphics ):void; + export function MaskFilter( graphics:Graphics ):void; + + + /* DEBUG METHODS */ + + export function runList( x ):void; + + /*INTERFACES*/ + + export interface IBasicCallback + { + ():void + } + + export interface IEvent + { + type: string; + content: any; + } + + export interface IHitArea + { + contains(x: number, y: number):boolean; + } + + export interface IInteractionDataCallback + { + (interactionData: InteractionData):void + } + + export interface IPixiRenderer + { + view: HTMLCanvasElement; + render(stage: Stage): void; + } + + export interface IBitmapTextStyle + { + font?: string; + align?: string; + } + + export interface ITextStyle + { + font?: string; + stroke?: string; + fill?: string; + align?: string; + strokeThickness?: number; + wordWrap?: boolean; + wordWrapWidth?:number; + } + + + + /* CLASES */ + + export class AssetLoader extends EventTarget + { + assetURLs: string[]; + onComplete: IBasicCallback; + onProgress: IBasicCallback; + constructor(assetURLs: string[], crossorigin?:boolean ); + load(): void; + } + + export class BaseTexture extends EventTarget + { + height: number; + width: number; + source: string; + + constructor(source: HTMLImageElement); + constructor(source: HTMLCanvasElement); + destroy():void; + + static fromImage(imageUrl: string, crossorigin?:boolean ): BaseTexture; + } + + export class BitmapFontLoader extends EventTarget + { + baseUrl:string; + crossorigin:boolean; + texture:Texture; + url:string; + constructor(url: string, crossorigin?: boolean); + load():void; + } + + export class BitmapText extends DisplayObjectContainer + { + width:number; + height:number; + constructor(text: string, style: IBitmapTextStyle); + setStyle(style: IBitmapTextStyle): void; + setText(text: string): void; + } + + export class CanvasRenderer implements IPixiRenderer + { + context: CanvasRenderingContext2D; + height: number; + view: HTMLCanvasElement; + width: number; + constructor(width: number, height: number, view?: HTMLCanvasElement, transparent?: boolean); + render(stage: Stage): void; + resize(width: number, height: number):void; + } + + export class Circle implements IHitArea + { + x: number; + y: number; + radius: number; + constructor(x: number, y: number, radius: number); + clone(): Circle; + contains(x: number, y: number):boolean; + } + + // TODO what is renderGroup + export class CustomRenderable extends DisplayObject + { + constructor(); + renderCanvas(renderer: CanvasRenderer): void; + initWebGL(renderer: WebGLRenderer): void; + renderWebGL(renderGroup: any, projectionMatrix: any): void; + } + + export class DisplayObject + { + alpha: number; + buttonMode: boolean; + filter:boolean; + hitArea: IHitArea; + parent: DisplayObjectContainer; + pivot: Point; + position: Point; + rotation: number; + renderable: boolean; + scale: Point; + stage: Stage; + visible: boolean; + worldAlpha: number; + constructor(); + static autoDetectRenderer(width: number, height: number, view?: HTMLCanvasElement, transparent?: boolean): IPixiRenderer; + click: IInteractionDataCallback; + mousedown: IInteractionDataCallback; + mouseout: IInteractionDataCallback; + mouseover: IInteractionDataCallback; + mouseup: IInteractionDataCallback; + mouseupoutside: IInteractionDataCallback; + mousemove: IInteractionDataCallback; + tap: IInteractionDataCallback; + touchend: IInteractionDataCallback; + touchendoutside: IInteractionDataCallback; + touchstart: IInteractionDataCallback; + touchmove: IInteractionDataCallback; + + //deprecated + setInteractive(interactive: boolean): void; + + // getters setters + interactive:boolean; + mask:Graphics; + } + + export class DisplayObjectContainer extends DisplayObject + { + children: DisplayObject[]; + constructor(); + + addChild(child: DisplayObject): void; + addChildAt(child: DisplayObject, index: number): void; + getChildAt(index:number):DisplayObject; + removeChild(child: DisplayObject): void; + swapChildren(child: DisplayObject, child2: DisplayObject): void; + } + + export class Ellipse implements IHitArea + { + x: number; + y: number; + width: number; + height: number; + + constructor(x: number, y: number, width: number, height: number); + clone(): Ellipse; + contains(x: number, y: number):boolean; + getBounds():Rectangle; + } + + export class EventTarget + { + addEventListener(type: string, listener: (event: IEvent) => void ); + removeEventListener(type: string, listener: (event: IEvent) => void ); + dispatchEvent(event: IEvent); + } + + export class Graphics extends DisplayObjectContainer + { + lineWidth:number; + lineColor:string; + constructor(); + + beginFill(color?: number, alpha?: number): void; + clear(): void; + drawCircle(x: number, y: number, radius: number): void; + drawElipse(x: number, y: number, width: number, height: number): void; + drawRect(x: number, y: number, width: number, height: number): void; + endFill(): void; + lineStyle(lineWidth?: number, color?: number, alpha?: number ): void; + lineTo(x: number, y: number): void; + moveTo(x: number, y: number): void; + + static POLY:number; + static RECT:number; + static CIRC:number; + static ELIP:number; + } + + export class ImageLoader extends EventTarget + { + texture:Texture; + constructor(url: string, crossorigin?: boolean); + load(): void; + } + + /* TODO determine type of originalEvent*/ + export class InteractionData + { + global: Point; + target: Sprite; + constructor(); + originalEvent:any; + getLocalPosition(displayObject: DisplayObject): Point; + } + + export class InteractionManager + { + mouse: InteractionData; + stage: Stage; + touchs:{ [id:string]:InteractionData }; + constructor(stage: Stage); + } + + export class JsonLoader extends EventTarget + { + url:string; + crossorigin: boolean; + baseUrl:string; + loaded:boolean; + constructor(url: string, crossorigin?: boolean); + load(): void; + } + + export class MovieClip extends Sprite + { + animationSpeed: number; + currentFrame:number; + loop: boolean; + playing: boolean; + textures: Texture[]; + constructor(textures: Texture[]); + onComplete:IBasicCallback; + gotoAndPlay(frameNumber: number): void; + gotoAndStop(frameNumber: number): void; + play(): void; + stop(): void; + } + + export class Point + { + x: number; + y: number; + constructor(x: number, y: number); + clone(): Point; + } + + export class Polygon implements IHitArea + { + points: Point[]; + + constructor(points: Point[]); + constructor(points: number[]); + constructor(...points: Point[]); + constructor(...points: number[]); + + clone(): Polygon; + contains( x:number, y:number ):boolean; + } + + export class Rectangle implements IHitArea + { + x: number; + y: number; + width: number; + height: number; + constructor(x: number, y: number, width: number, height: number); + clone(): Rectangle; + contains(x: number, y: number):boolean + } + + export class RenderTexture extends Texture + { + constructor(width: number, height: number); + resize(width: number, height: number): void; + } + + export class Sprite extends DisplayObjectContainer + { + anchor: Point; + blendMode: number; + texture: Texture; + + //getters setters + height: number; + width: number; + + constructor(texture: Texture); + + static fromFrame(frameId: string): Sprite; + static fromImage(url: string): Sprite; + setTexture(texture: Texture): void; + } + + /* TODO determine type of frames */ + export class SpriteSheetLoader extends EventTarget + { + url:string; + crossorigin:boolean; + baseUrl:string; + texture:Texture; + frames:Object; + constructor(url: string, crossorigin?: boolean); + load(); + } + + export class Stage extends DisplayObjectContainer + { + interactive:boolean; + interactionManager:InteractionManager; + constructor(backgroundColor: number, interactive?: boolean); + getMousePosition(): Point; + setBackgroundColor(backgroundColor: number): void; + } + + export class Text extends Sprite + { + constructor(text: string, style: ITextStyle); + destroy(destroyTexture:boolean):void; + setText(text: string): void; + setStyle(style: ITextStyle): void; + } + + export class Texture extends EventTarget + { + baseTexture: BaseTexture; + frame: Rectangle; + trim:Point; + render( displayObject:DisplayObject, position:Point, clear:boolean ):void; + constructor(baseTexture: BaseTexture, frame?: Rectangle); + destroy(destroyBase:boolean):void; + setFrame(frame: Rectangle): void; + + static addTextureToCache(texture: Texture, id: string): void; + static fromCanvas(canvas: HTMLCanvasElement): Texture; + static fromFrame(frameId: string): Texture; + static fromImage(imageUrl: string, crossorigin?: boolean): Texture; + static removeTextureFromCache(id: any): Texture; + } + + export class TilingSprite extends DisplayObjectContainer + { + width:number; + height:number; + texture:Texture; + tilePosition: Point; + tileScale: Point; + constructor(texture: Texture, width: number, height: number); + setTexture( texture: Texture ):void; + } + + export class WebGLBatch + { + constructor(webGLContext: WebGLRenderingContext); + clean():void; + restoreLostContext(gl:WebGLRenderingContext) + init(sprite: Sprite): void; + insertAfter(sprite: Sprite, previousSprite: Sprite): void; + insertBefore(sprite: Sprite, nextSprite: Sprite): void; + growBatch(): void; + merge(batch: WebGLBatch): void; + refresh(): void; + remove(sprite: Sprite): void; + render(): void; + split(sprite: Sprite): WebGLBatch; + update(): void; + } + + /* Determine type of Object */ + export class WebGLRenderGroup + { + render(projection:Object):void; + } + + export class WebGLRenderer implements IPixiRenderer + { + view: HTMLCanvasElement; + constructor(width: number, height: number, view?: HTMLCanvasElement, transparent?: boolean, antialias?:boolean ); + render(stage: Stage): void; + resize(width: number, height: number): void; + } + +} + +declare function requestAnimFrame( animate: PIXI.IBasicCallback ); + + +declare module PIXI.PolyK +{ + export function Triangulate( p:number[]):number[]; +} + + + diff --git a/pixi/webgl.d.ts b/pixi/webgl.d.ts new file mode 100644 index 000000000..63172ad92 --- /dev/null +++ b/pixi/webgl.d.ts @@ -0,0 +1,534 @@ +interface WebGLContextAttributes { + alpha : boolean; + depth : boolean; + stencil : boolean; + antialias : boolean; + premultipliedAlpha : boolean; +} + +interface WebGLObject { + $__dummyprop__WebGLObject : any; +} + +interface WebGLBuffer extends WebGLObject { + $__dummyprop__WebGLBuffer : any; +} + +interface WebGLFramebuffer extends WebGLObject { + $__dummyprop__WebGLFramebuffer : any; +} + +interface WebGLProgram extends WebGLObject { + $__dummyprop__WebGLProgram : any; +} + +interface WebGLRenderbuffer extends WebGLObject { + $__dummyprop__WebGLRenderbuffer : any; +} + +interface WebGLShader extends WebGLObject { + $__dummyprop__WebGLShader : any; +} + +interface WebGLTexture extends WebGLObject { + $__dummyprop__WebGLTexture : any; +} + +interface WebGLUniformLocation { + $__dummyprop__WebGLUniformLocation : any; +} + +interface WebGLActiveInfo { + size : number; + type : number; + name : string; +} + +interface WebGLRenderingContext { + DEPTH_BUFFER_BIT : number; + STENCIL_BUFFER_BIT : number; + COLOR_BUFFER_BIT : number; + POINTS : number; + LINES : number; + LINE_LOOP : number; + LINE_STRIP : number; + TRIANGLES : number; + TRIANGLE_STRIP : number; + TRIANGLE_FAN : number; + ZERO : number; + ONE : number; + SRC_COLOR : number; + ONE_MINUS_SRC_COLOR : number; + SRC_ALPHA : number; + ONE_MINUS_SRC_ALPHA : number; + DST_ALPHA : number; + ONE_MINUS_DST_ALPHA : number; + DST_COLOR : number; + ONE_MINUS_DST_COLOR : number; + SRC_ALPHA_SATURATE : number; + FUNC_ADD : number; + BLEND_EQUATION : number; + BLEND_EQUATION_RGB : number; + BLEND_EQUATION_ALPHA : number; + FUNC_SUBTRACT : number; + FUNC_REVERSE_SUBTRACT : number; + BLEND_DST_RGB : number; + BLEND_SRC_RGB : number; + BLEND_DST_ALPHA : number; + BLEND_SRC_ALPHA : number; + CONSTANT_COLOR : number; + ONE_MINUS_CONSTANT_COLOR : number; + CONSTANT_ALPHA : number; + ONE_MINUS_CONSTANT_ALPHA : number; + BLEND_COLOR : number; + ARRAY_BUFFER : number; + ELEMENT_ARRAY_BUFFER : number; + ARRAY_BUFFER_BINDING : number; + ELEMENT_ARRAY_BUFFER_BINDING : number; + STREAM_DRAW : number; + STATIC_DRAW : number; + DYNAMIC_DRAW : number; + BUFFER_SIZE : number; + BUFFER_USAGE : number; + CURRENT_VERTEX_ATTRIB : number; + FRONT : number; + BACK : number; + FRONT_AND_BACK : number; + TEXTURE_2D : number; + CULL_FACE : number; + BLEND : number; + DITHER : number; + STENCIL_TEST : number; + DEPTH_TEST : number; + SCISSOR_TEST : number; + POLYGON_OFFSET_FILL : number; + SAMPLE_ALPHA_TO_COVERAGE : number; + SAMPLE_COVERAGE : number; + NO_ERROR : number; + INVALID_ENUM : number; + INVALID_VALUE : number; + INVALID_OPERATION : number; + OUT_OF_MEMORY : number; + CW : number; + CCW : number; + LINE_WIDTH : number; + ALIASED_POINT_SIZE_RANGE : number; + ALIASED_LINE_WIDTH_RANGE : number; + CULL_FACE_MODE : number; + FRONT_FACE : number; + DEPTH_RANGE : number; + DEPTH_WRITEMASK : number; + DEPTH_CLEAR_VALUE : number; + DEPTH_FUNC : number; + STENCIL_CLEAR_VALUE : number; + STENCIL_FUNC : number; + STENCIL_FAIL : number; + STENCIL_PASS_DEPTH_FAIL : number; + STENCIL_PASS_DEPTH_PASS : number; + STENCIL_REF : number; + STENCIL_VALUE_MASK : number; + STENCIL_WRITEMASK : number; + STENCIL_BACK_FUNC : number; + STENCIL_BACK_FAIL : number; + STENCIL_BACK_PASS_DEPTH_FAIL : number; + STENCIL_BACK_PASS_DEPTH_PASS : number; + STENCIL_BACK_REF : number; + STENCIL_BACK_VALUE_MASK : number; + STENCIL_BACK_WRITEMASK : number; + VIEWPORT : number; + SCISSOR_BOX : number; + COLOR_CLEAR_VALUE : number; + COLOR_WRITEMASK : number; + UNPACK_ALIGNMENT : number; + PACK_ALIGNMENT : number; + MAX_TEXTURE_SIZE : number; + MAX_VIEWPORT_DIMS : number; + SUBPIXEL_BITS : number; + RED_BITS : number; + GREEN_BITS : number; + BLUE_BITS : number; + ALPHA_BITS : number; + DEPTH_BITS : number; + STENCIL_BITS : number; + POLYGON_OFFSET_UNITS : number; + POLYGON_OFFSET_FACTOR : number; + TEXTURE_BINDING_2D : number; + SAMPLE_BUFFERS : number; + SAMPLES : number; + SAMPLE_COVERAGE_VALUE : number; + SAMPLE_COVERAGE_INVERT : number; + NUM_COMPRESSED_TEXTURE_FORMATS : number; + COMPRESSED_TEXTURE_FORMATS : number; + DONT_CARE : number; + FASTEST : number; + NICEST : number; + GENERATE_MIPMAP_HINT : number; + BYTE : number; + UNSIGNED_BYTE : number; + SHORT : number; + UNSIGNED_SHORT : number; + INT : number; + UNSIGNED_INT : number; + FLOAT : number; + DEPTH_COMPONENT : number; + ALPHA : number; + RGB : number; + RGBA : number; + LUMINANCE : number; + LUMINANCE_ALPHA : number; + UNSIGNED_SHORT_4_4_4_4 : number; + UNSIGNED_SHORT_5_5_5_1 : number; + UNSIGNED_SHORT_5_6_5 : number; + FRAGMENT_SHADER : number; + VERTEX_SHADER : number; + MAX_VERTEX_ATTRIBS : number; + MAX_VERTEX_UNIFORM_VECTORS : number; + MAX_VARYING_VECTORS : number; + MAX_COMBINED_TEXTURE_IMAGE_UNITS : number; + MAX_VERTEX_TEXTURE_IMAGE_UNITS : number; + MAX_TEXTURE_IMAGE_UNITS : number; + MAX_FRAGMENT_UNIFORM_VECTORS : number; + SHADER_TYPE : number; + DELETE_STATUS : number; + LINK_STATUS : number; + VALIDATE_STATUS : number; + ATTACHED_SHADERS : number; + ACTIVE_UNIFORMS : number; + ACTIVE_UNIFORM_MAX_LENGTH : number; + ACTIVE_ATTRIBUTES : number; + ACTIVE_ATTRIBUTE_MAX_LENGTH : number; + SHADING_LANGUAGE_VERSION : number; + CURRENT_PROGRAM : number; + NEVER : number; + LESS : number; + EQUAL : number; + LEQUAL : number; + GREATER : number; + NOTEQUAL : number; + GEQUAL : number; + ALWAYS : number; + KEEP : number; + REPLACE : number; + INCR : number; + DECR : number; + INVERT : number; + INCR_WRAP : number; + DECR_WRAP : number; + VENDOR : number; + RENDERER : number; + VERSION : number; + NEAREST : number; + LINEAR : number; + NEAREST_MIPMAP_NEAREST : number; + LINEAR_MIPMAP_NEAREST : number; + NEAREST_MIPMAP_LINEAR : number; + LINEAR_MIPMAP_LINEAR : number; + TEXTURE_MAG_FILTER : number; + TEXTURE_MIN_FILTER : number; + TEXTURE_WRAP_S : number; + TEXTURE_WRAP_T : number; + TEXTURE : number; + TEXTURE_CUBE_MAP : number; + TEXTURE_BINDING_CUBE_MAP : number; + TEXTURE_CUBE_MAP_POSITIVE_X : number; + TEXTURE_CUBE_MAP_NEGATIVE_X : number; + TEXTURE_CUBE_MAP_POSITIVE_Y : number; + TEXTURE_CUBE_MAP_NEGATIVE_Y : number; + TEXTURE_CUBE_MAP_POSITIVE_Z : number; + TEXTURE_CUBE_MAP_NEGATIVE_Z : number; + MAX_CUBE_MAP_TEXTURE_SIZE : number; + TEXTURE0 : number; + TEXTURE1 : number; + TEXTURE2 : number; + TEXTURE3 : number; + TEXTURE4 : number; + TEXTURE5 : number; + TEXTURE6 : number; + TEXTURE7 : number; + TEXTURE8 : number; + TEXTURE9 : number; + TEXTURE10 : number; + TEXTURE11 : number; + TEXTURE12 : number; + TEXTURE13 : number; + TEXTURE14 : number; + TEXTURE15 : number; + TEXTURE16 : number; + TEXTURE17 : number; + TEXTURE18 : number; + TEXTURE19 : number; + TEXTURE20 : number; + TEXTURE21 : number; + TEXTURE22 : number; + TEXTURE23 : number; + TEXTURE24 : number; + TEXTURE25 : number; + TEXTURE26 : number; + TEXTURE27 : number; + TEXTURE28 : number; + TEXTURE29 : number; + TEXTURE30 : number; + TEXTURE31 : number; + ACTIVE_TEXTURE : number; + REPEAT : number; + CLAMP_TO_EDGE : number; + MIRRORED_REPEAT : number; + FLOAT_VEC2 : number; + FLOAT_VEC3 : number; + FLOAT_VEC4 : number; + INT_VEC2 : number; + INT_VEC3 : number; + INT_VEC4 : number; + BOOL : number; + BOOL_VEC2 : number; + BOOL_VEC3 : number; + BOOL_VEC4 : number; + FLOAT_MAT2 : number; + FLOAT_MAT3 : number; + FLOAT_MAT4 : number; + SAMPLER_2D : number; + SAMPLER_CUBE : number; + VERTEX_ATTRIB_ARRAY_ENABLED : number; + VERTEX_ATTRIB_ARRAY_SIZE : number; + VERTEX_ATTRIB_ARRAY_STRIDE : number; + VERTEX_ATTRIB_ARRAY_TYPE : number; + VERTEX_ATTRIB_ARRAY_NORMALIZED : number; + VERTEX_ATTRIB_ARRAY_POINTER : number; + VERTEX_ATTRIB_ARRAY_BUFFER_BINDING : number; + COMPILE_STATUS : number; + INFO_LOG_LENGTH : number; + SHADER_SOURCE_LENGTH : number; + LOW_FLOAT : number; + MEDIUM_FLOAT : number; + HIGH_FLOAT : number; + LOW_INT : number; + MEDIUM_INT : number; + HIGH_INT : number; + FRAMEBUFFER : number; + RENDERBUFFER : number; + RGBA4 : number; + RGB5_A1 : number; + RGB565 : number; + DEPTH_COMPONENT16 : number; + STENCIL_INDEX : number; + STENCIL_INDEX8 : number; + DEPTH_STENCIL : number; + RENDERBUFFER_WIDTH : number; + RENDERBUFFER_HEIGHT : number; + RENDERBUFFER_INTERNAL_FORMAT : number; + RENDERBUFFER_RED_SIZE : number; + RENDERBUFFER_GREEN_SIZE : number; + RENDERBUFFER_BLUE_SIZE : number; + RENDERBUFFER_ALPHA_SIZE : number; + RENDERBUFFER_DEPTH_SIZE : number; + RENDERBUFFER_STENCIL_SIZE : number; + FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE : number; + FRAMEBUFFER_ATTACHMENT_OBJECT_NAME : number; + FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL : number; + FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE : number; + COLOR_ATTACHMENT0 : number; + DEPTH_ATTACHMENT : number; + STENCIL_ATTACHMENT : number; + DEPTH_STENCIL_ATTACHMENT : number; + NONE : number; + FRAMEBUFFER_COMPLETE : number; + FRAMEBUFFER_INCOMPLETE_ATTACHMENT : number; + FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT : number; + FRAMEBUFFER_INCOMPLETE_DIMENSIONS : number; + FRAMEBUFFER_UNSUPPORTED : number; + FRAMEBUFFER_BINDING : number; + RENDERBUFFER_BINDING : number; + MAX_RENDERBUFFER_SIZE : number; + INVALID_FRAMEBUFFER_OPERATION : number; + UNPACK_FLIP_Y_WEBGL : number; + UNPACK_PREMULTIPLY_ALPHA_WEBGL : number; + CONTEXT_LOST_WEBGL : number; + UNPACK_COLORSPACE_CONVERSION_WEBGL : number; + BROWSER_DEFAULT_WEBGL : number; + canvas : HTMLCanvasElement; + getContextAttributes() : WebGLContextAttributes; + isContextLost() : boolean; + getSupportedExtensions() : string[]; + getExtension(name : string) : any; + activeTexture(texture : number) : void; + attachShader(program : WebGLProgram, shader : WebGLShader) : void; + bindAttribLocation(program : WebGLProgram, index : number, name : string) : void; + bindBuffer(target : number, buffer : WebGLBuffer) : void; + bindFramebuffer(target : number, framebuffer : WebGLFramebuffer) : void; + bindRenderbuffer(target : number, renderbuffer : WebGLRenderbuffer) : void; + bindTexture(target : number, texture : WebGLTexture) : void; + blendColor(red : number, green : number, blue : number, alpha : number) : void; + blendEquation(mode : number) : void; + blendEquationSeparate(modeRGB : number, modeAlpha : number) : void; + blendFunc(sfactor : number, dfactor : number) : void; + blendFuncSeparate(srcRGB : number, dstRGB : number, srcAlpha : number, dstAlpha : number) : void; + bufferData(target : number, size : number, usage : number) : void; + bufferData(target : number, data : ArrayBufferView, usage : number) : void; + bufferData(target : number, data : ArrayBuffer, usage : number) : void; + bufferSubData(target : number, offset : number, data : ArrayBufferView) : void; + bufferSubData(target : number, offset : number, data : ArrayBuffer) : void; + checkFramebufferStatus(target : number) : number; + clear(mask : number) : void; + clearColor(red : number, green : number, blue : number, alpha : number) : void; + clearDepth(depth : number) : void; + clearStencil(s : number) : void; + colorMask(red : boolean, green : boolean, blue : boolean, alpha : boolean) : void; + compileShader(shader : WebGLShader) : void; + copyTexImage2D(target : number, level : number, internalformat : number, x : number, y : number, width : number, height : number, border : number) : void; + copyTexSubImage2D(target : number, level : number, xoffset : number, yoffset : number, x : number, y : number, width : number, height : number) : void; + createBuffer() : WebGLBuffer; + createFramebuffer() : WebGLFramebuffer; + createProgram() : WebGLProgram; + createRenderbuffer() : WebGLRenderbuffer; + createShader(type : number) : WebGLShader; + createTexture() : WebGLTexture; + cullFace(mode : number) : void; + deleteBuffer(buffer : WebGLBuffer) : void; + deleteFramebuffer(framebuffer : WebGLFramebuffer) : void; + deleteProgram(program : WebGLProgram) : void; + deleteRenderbuffer(renderbuffer : WebGLRenderbuffer) : void; + deleteShader(shader : WebGLShader) : void; + deleteTexture(texture : WebGLTexture) : void; + depthFunc(func : number) : void; + depthMask(flag : boolean) : void; + depthRange(zNear : number, zFar : number) : void; + detachShader(program : WebGLProgram, shader : WebGLShader) : void; + disable(cap : number) : void; + disableVertexAttribArray(index : number) : void; + drawArrays(mode : number, first : number, count : number) : void; + drawElements(mode : number, count : number, type : number, offset : number) : void; + enable(cap : number) : void; + enableVertexAttribArray(index : number) : void; + finish() : void; + flush() : void; + framebufferRenderbuffer(target : number, attachment : number, renderbuffertarget : number, renderbuffer : WebGLRenderbuffer) : void; + framebufferTexture2D(target : number, attachment : number, textarget : number, texture : WebGLTexture, level : number) : void; + frontFace(mode : number) : void; + generateMipmap(target : number) : void; + getActiveAttrib(program : WebGLProgram, index : number) : WebGLActiveInfo; + getActiveUniform(program : WebGLProgram, index : number) : WebGLActiveInfo; + getAttachedShaders(program : WebGLProgram) : WebGLShader[]; + getAttribLocation(program : WebGLProgram, name : string) : number; + getParameter(pname : number) : any; + getBufferParameter(target : number, pname : number) : any; + getError() : number; + getFramebufferAttachmentParameter(target : number, attachment : number, pname : number) : any; + getProgramParameter(program : WebGLProgram, pname : number) : any; + getProgramInfoLog(program : WebGLProgram) : string; + getRenderbufferParameter(target : number, pname : number) : any; + getShaderParameter(shader : WebGLShader, pname : number) : any; + getShaderInfoLog(shader : WebGLShader) : string; + getShaderSource(shader : WebGLShader) : string; + getTexParameter(target : number, pname : number) : any; + getUniform(program : WebGLProgram, location : WebGLUniformLocation) : any; + getUniformLocation(program : WebGLProgram, name : string) : WebGLUniformLocation; + getVertexAttrib(index : number, pname : number) : any; + getVertexAttribOffset(index : number, pname : number) : number; + hint(target : number, mode : number) : void; + isBuffer(buffer : WebGLBuffer) : boolean; + isEnabled(cap : number) : boolean; + isFramebuffer(framebuffer : WebGLFramebuffer) : boolean; + isProgram(program : WebGLProgram) : boolean; + isRenderbuffer(renderbuffer : WebGLRenderbuffer) : boolean; + isShader(shader : WebGLShader) : boolean; + isTexture(texture : WebGLTexture) : boolean; + lineWidth(width : number) : void; + linkProgram(program : WebGLProgram) : void; + pixelStorei(pname : number, param : number) : void; + polygonOffset(factor : number, units : number) : void; + readPixels(x : number, y : number, width : number, height : number, format : number, type : number, pixels : ArrayBufferView) : void; + renderbufferStorage(target : number, internalformat : number, width : number, height : number) : void; + sampleCoverage(value : number, invert : boolean) : void; + scissor(x : number, y : number, width : number, height : number) : void; + shaderSource(shader : WebGLShader, source : string) : void; + stencilFunc(func : number, ref : number, mask : number) : void; + stencilFuncSeparate(face : number, func : number, ref : number, mask : number) : void; + stencilMask(mask : number) : void; + stencilMaskSeparate(face : number, mask : number) : void; + stencilOp(fail : number, zfail : number, zpass : number) : void; + stencilOpSeparate(face : number, fail : number, zfail : number, zpass : number) : void; + texImage2D(target : number, level : number, internalformat : number, width : number, height : number, border : number, format : number, type : number, pixels : ArrayBufferView) : void; + texImage2D(target : number, level : number, internalformat : number, format : number, type : number, pixels : ImageData) : void; + texImage2D(target : number, level : number, internalformat : number, format : number, type : number, image : HTMLImageElement) : void; + texImage2D(target : number, level : number, internalformat : number, format : number, type : number, canvas : HTMLCanvasElement) : void; + texImage2D(target : number, level : number, internalformat : number, format : number, type : number, video : HTMLVideoElement) : void; + texParameterf(target : number, pname : number, param : number) : void; + texParameteri(target : number, pname : number, param : number) : void; + texSubImage2D(target : number, level : number, xoffset : number, yoffset : number, width : number, height : number, format : number, type : number, pixels : ArrayBufferView) : void; + texSubImage2D(target : number, level : number, xoffset : number, yoffset : number, format : number, type : number, pixels : ImageData) : void; + texSubImage2D(target : number, level : number, xoffset : number, yoffset : number, format : number, type : number, image : HTMLImageElement) : void; + texSubImage2D(target : number, level : number, xoffset : number, yoffset : number, format : number, type : number, canvas : HTMLCanvasElement) : void; + texSubImage2D(target : number, level : number, xoffset : number, yoffset : number, format : number, type : number, video : HTMLVideoElement) : void; + uniform1f(location : WebGLUniformLocation, x : number) : void; + uniform1fv(location : WebGLUniformLocation, v : Float32Array) : void; + uniform1fv(location : WebGLUniformLocation, v : number[]) : void; + uniform1i(location : WebGLUniformLocation, x : number) : void; + uniform1iv(location : WebGLUniformLocation, v : Int32Array) : void; + uniform1iv(location : WebGLUniformLocation, v : number[]) : void; + uniform2f(location : WebGLUniformLocation, x : number, y : number) : void; + uniform2fv(location : WebGLUniformLocation, v : Float32Array) : void; + uniform2fv(location : WebGLUniformLocation, v : number[]) : void; + uniform2i(location : WebGLUniformLocation, x : number, y : number) : void; + uniform2iv(location : WebGLUniformLocation, v : Int32Array) : void; + uniform2iv(location : WebGLUniformLocation, v : number[]) : void; + uniform3f(location : WebGLUniformLocation, x : number, y : number, z : number) : void; + uniform3fv(location : WebGLUniformLocation, v : Float32Array) : void; + uniform3fv(location : WebGLUniformLocation, v : number[]) : void; + uniform3i(location : WebGLUniformLocation, x : number, y : number, z : number) : void; + uniform3iv(location : WebGLUniformLocation, v : Int32Array) : void; + uniform3iv(location : WebGLUniformLocation, v : number[]) : void; + uniform4f(location : WebGLUniformLocation, x : number, y : number, z : number, w : number) : void; + uniform4fv(location : WebGLUniformLocation, v : Float32Array) : void; + uniform4fv(location : WebGLUniformLocation, v : number[]) : void; + uniform4i(location : WebGLUniformLocation, x : number, y : number, z : number, w : number) : void; + uniform4iv(location : WebGLUniformLocation, v : Int32Array) : void; + uniform4iv(location : WebGLUniformLocation, v : number[]) : void; + uniformMatrix2fv(location : WebGLUniformLocation, transpose : boolean, value : Float32Array) : void; + uniformMatrix2fv(location : WebGLUniformLocation, transpose : boolean, value : number[]) : void; + uniformMatrix3fv(location : WebGLUniformLocation, transpose : boolean, value : Float32Array) : void; + uniformMatrix3fv(location : WebGLUniformLocation, transpose : boolean, value : number[]) : void; + uniformMatrix4fv(location : WebGLUniformLocation, transpose : boolean, value : Float32Array) : void; + uniformMatrix4fv(location : WebGLUniformLocation, transpose : boolean, value : number[]) : void; + useProgram(program : WebGLProgram) : void; + validateProgram(program : WebGLProgram) : void; + vertexAttrib1f(indx : number, x : number) : void; + vertexAttrib1fv(indx : number, values : Float32Array) : void; + vertexAttrib1fv(indx : number, values : number[]) : void; + vertexAttrib2f(indx : number, x : number, y : number) : void; + vertexAttrib2fv(indx : number, values : Float32Array) : void; + vertexAttrib2fv(indx : number, values : number[]) : void; + vertexAttrib3f(indx : number, x : number, y : number, z : number) : void; + vertexAttrib3fv(indx : number, values : Float32Array) : void; + vertexAttrib3fv(indx : number, values : number[]) : void; + vertexAttrib4f(indx : number, x : number, y : number, z : number, w : number) : void; + vertexAttrib4fv(indx : number, values : Float32Array) : void; + vertexAttrib4fv(indx : number, values : number[]) : void; + vertexAttribPointer(indx : number, size : number, type : number, normalized : boolean, stride : number, offset : number) : void; + viewport(x : number, y : number, width : number, height : number) : void; +} + +interface WebGLContextEvent extends Event { + statusMessage : string; + initWebGLContextEvent(typeArg : string, canBubbleArg : boolean, cancelableArg : boolean, statusMessageArg : string) : void; +} + +//Extend the window object with cross Browser callbacks so TS will not complain +//Also add the (non-standard) Canvas Element parameter for performance improvement +interface WindowAnimationTiming { + requestAnimationFrame(callback: FrameRequestCallback, canvas ?: HTMLCanvasElement): number; + //msRequestAnimationFrame(callback: FrameRequestCallback, canvas ?: HTMLCanvasElement): number; + mozRequestAnimationFrame(callback: FrameRequestCallback, canvas ?: HTMLCanvasElement): number; + webkitRequestAnimationFrame(callback: FrameRequestCallback, canvas ?: HTMLCanvasElement): number; + oRequestAnimationFrame(callback: FrameRequestCallback, canvas ?: HTMLCanvasElement): number; + + cancelRequestAnimationFrame(handle: number): void; + //msCancelRequestAnimationFrame(handle: number): void; + mozCancelRequestAnimationFrame(handle: number): void; + webkitCancelRequestAnimationFrame(handle: number): void; + oCancelRequestAnimationFrame(handle: number): void; +} + +//To make WebGL work +interface HTMLCanvasElement { + getContext(contextId: string, params : {}): WebGLRenderingContext; +} \ No newline at end of file From bd9fc8c26008f1115ed33e3acbed73ff44af6bf0 Mon Sep 17 00:00:00 2001 From: Cy Brown Date: Thu, 22 Aug 2013 22:47:06 +0200 Subject: [PATCH 05/12] Extending EventEmitter interface on FSWatcher interface --- node/node.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/node.d.ts b/node/node.d.ts index 50441ac0c..87125701e 100644 --- a/node/node.d.ts +++ b/node/node.d.ts @@ -716,7 +716,7 @@ declare module "fs" { ctime: Date; } - interface FSWatcher { + interface FSWatcher extends EventEmitter { close(): void; } From d9fc614e1bdc922a0ba8386c865403239ebd3adf Mon Sep 17 00:00:00 2001 From: Natan Vivo Date: Fri, 23 Aug 2013 15:32:48 -0300 Subject: [PATCH 06/12] New library: dropzone.js. --- dropzone/dropzone.d.ts | 77 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 dropzone/dropzone.d.ts diff --git a/dropzone/dropzone.d.ts b/dropzone/dropzone.d.ts new file mode 100644 index 000000000..f02b59f73 --- /dev/null +++ b/dropzone/dropzone.d.ts @@ -0,0 +1,77 @@ +// Type definitions for Dropzone 3.7.1 +// Project: http://www.dropzonejs.com/ +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +interface DropzoneFile extends File { + previewElement: HTMLElement; + previewTemplate: HTMLElement; + previewsContainer: HTMLElement; + status: string; + accepted: boolean; +} + +interface DropzoneOptions { + url?: string; + method?: string; + withCredentials?: boolean; + parallelUploads?: number; + maxFilesize?: number; + paramName?: string; + uploadMultiple?: boolean; + headers?: any; + addRemoveLinks?: boolean; + previewsContainer?: string; + clickable?: boolean; + createImageThumbnails?: boolean; + maxThumbnailFilesize?: number; + thumbnailWidth?: number; + thumbnailHeight?: number; + maxFiles?: number; + resize?: (file?: any) => any; + init?: () => void; + acceptedFiles?: string; + accept?: (file: DropzoneFile, doneCallback: (...args) => void) => void; + autoProcessQueue?: boolean; + previewTemplate?: string; + forceFallback?: boolean; + fallback?: () => void; + + // dictionary options + dictDefaultMessage?: string; + dictFallbackMessage?: string; + dictFallbackText?: string; + dictInvalidFileType?: string; + dictFileTooBig?: string; + dictResponseError?: string; + dictCancelUpload?: string; + dictCancelUploadConfirmation?: string; + dictRemoveFile?: string; + dictRemoveFileConfirmation?: string; + dictMaxFilesExceeded?: string; +} + +declare class Dropzone { + constructor(container: string, options?: DropzoneOptions); + static autoDiscover: boolean; + static options: any; + static confirm: (question: string, accepted: () => void, rejected?: () => void) => void; + + files: DropzoneFile[]; + + on(eventName, callback: (...args) => any); + off(eventName): void; + + removeFile(file: DropzoneFile): void; + removeAllFiles(): void; + processQueue(): void; + getAcceptedFiles(): DropzoneFile[]; + getRejectedFiles(): DropzoneFile[]; + getQueuedFiles(): DropzoneFile[]; + getUploadingFiles(): DropzoneFile[]; +} + +interface JQuery { + dropzone(options: DropzoneOptions): Dropzone; +} \ No newline at end of file From f9fb693e0880f12787e1ce4df5eed6d9a5bd70a2 Mon Sep 17 00:00:00 2001 From: Jed Hunsaker Date: Sat, 24 Aug 2013 13:02:43 -0700 Subject: [PATCH 07/12] Remove Intl definition The Intl module is now built-in to TypeScript, which is why this definition is failing compilation by colliding with already-existing interfaces. --- intl/intl-tests.ts | 90 --------------------------------------- intl/intl.d.ts | 102 --------------------------------------------- 2 files changed, 192 deletions(-) delete mode 100644 intl/intl-tests.ts delete mode 100644 intl/intl.d.ts diff --git a/intl/intl-tests.ts b/intl/intl-tests.ts deleted file mode 100644 index d2a996739..000000000 --- a/intl/intl-tests.ts +++ /dev/null @@ -1,90 +0,0 @@ -/// - -// Collator - -alert(Intl.Collator.supportedLocalesOf(["ban", "id-u-co-pinyin", "de-ID"], { localeMatcher: "lookup" }).join(", ")); -// → "id-u-co-pinyin, de-ID" - -// in German, ä sorts with a -alert(new Intl.Collator("de").compare("ä", "z").toString()); -// → a negative value - -// in Swedish, ä sorts after z -alert(new Intl.Collator("sv").compare("ä", "z").toString()); -// → a positive value - -// in German, ä has a as the base letter -alert(new Intl.Collator("de", { sensitivity: "base" }).compare("ä", "a").toString()); -// → 0 - -// in Swedish, ä and a are separate base letters -alert(new Intl.Collator("sv", { sensitivity: "base" }).compare("ä", "a").toString()); -// → a positive value - -var a = ["Offenbach", "Österreich", "Odenwald"]; -var collator = new Intl.Collator("de-u-co-phonebk"); -a.sort(collator.compare); -alert(a.join(", ")); -// → "Odenwald, Österreich, Offenbach" - - -// DateTimeFormat - -alert(Intl.DateTimeFormat.supportedLocalesOf(["ban", "id-u-co-pinyin", "de-ID"], { localeMatcher: "lookup" }).join(", ")); -// → "id-u-co-pinyin, de-ID" - -// toLocaleString without arguments depends on the implementation, -// the default locale, and the default time zone -alert(new Intl.DateTimeFormat().format(new Date(Date.UTC(2012, 11, 20, 3, 0, 0)))); -// → "12/19/2012" if run in en-US locale with time zone America/Los_Angeles - -alert(new Intl.DateTimeFormat("sr-RS", { weekday: "long", year: "numeric", month: "long", day: "numeric" }).format(new Date())); -// → "недеља, 7. април 2013." - -alert([new Date(2012, 08), new Date(2012, 11), new Date(2012, 03)].map(new Intl.DateTimeFormat("pt-BR", { year: "numeric", month: "long" }).format).join("; ")); -// → "setembro de 2012; dezembro de 2012; abril de 2012" - - -// NumberFormat - -alert(Intl.NumberFormat.supportedLocalesOf(["ban", "id-u-co-pinyin", "de-ID"], { localeMatcher: "lookup" }).join(", ")); -// → "id-u-co-pinyin, de-ID" - -alert(new Intl.NumberFormat("ru-RU", { style: "currency", currency: "RUB" }).format(654321.987)); -// → "654 321,99 руб." - -alert([123456.789, 987654.321, 456789.123].map(new Intl.NumberFormat("es-ES").format).join("; ")); -// → "123.456,789; 987.654,321; 456.789,123" - -// German uses comma as decimal separator and period for thousands -alert(new Intl.NumberFormat("de-DE").format(123456.789)); -// → 123.456,789 - -// Arabic in most Arabic speaking countries uses real Arabic digits -alert(new Intl.NumberFormat("ar-EG").format(123456.789)); -// → ١٢٣٤٥٦٫٧٨٩ - -// India uses thousands/lakh/crore separators -alert(new Intl.NumberFormat("en-IN").format(123456.789)); -// → 1,23,456.789 - -// the nu extension key requests a numbering system, e.g. Chinese decimal -alert(new Intl.NumberFormat("zh-Hans-CN-u-nu-hanidec").format(123456.789)); -// → 一二三,四五六.七八九 - -// when requesting a language that may not be supported, such as -// Balinese, include a fallback language, in this case Indonesian -alert(new Intl.NumberFormat(["ban", "id"]).format(123456.789)); -// → 123.456,789 - -// request a currency format -alert(new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" }).format(123456.789)); -// → 123.456,79 € - -// the Japanese yen doesn't use a minor unit -alert(new Intl.NumberFormat("ja-JP", { style: "currency", currency: "JPY" }).format(123456.789)) -// → ¥123,457 - -// limit to three significant digits -alert(new Intl.NumberFormat("en-IN", { maximumSignificantDigits: 3 }).format(123456.789)); -// → 1,23,000 \ No newline at end of file diff --git a/intl/intl.d.ts b/intl/intl.d.ts deleted file mode 100644 index bc3359483..000000000 --- a/intl/intl.d.ts +++ /dev/null @@ -1,102 +0,0 @@ -// Type definitions for Intl -// Project: http://www.ecma-international.org/ecma-402/1.0/ -// Definitions by: Jeffery Grajkowski -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -declare module Intl { - - export interface SupportedLocalesOfOptions { - localeMatcher?: string; - } - - export interface CollatorOptions { - localeMatcher?: string; - usage?: string; - sensitivity?: string; - ignorePunctuation?: boolean; - numeric?: boolean; - caseFirst?: string; - } - - export class Collator { - constructor(locales?: string, options?: CollatorOptions); - constructor(locales?: string[], options?: CollatorOptions); - static supportedLocalesOf(locales: string, options?: SupportedLocalesOfOptions): string[]; - static supportedLocalesOf(locales: string[], options?: SupportedLocalesOfOptions): string[]; - compare(string1: string, string2: string): number; - resolvedOptions(): { - locale: string; - usage: string; - sensitivity: string; - ignorePunctuation: boolean; - collation: string; - numeric: boolean; - caseFirst: string; - }; - } - - export interface DateTimeFormatOptions { - localeMatcher?: string; - timeZone?: string; - hour12?: boolean; - formatMatcher?: boolean; - } - - export class DateTimeFormat { - constructor(locales?: string, options?: DateTimeFormatOptions); - constructor(locales?: string[], options?: DateTimeFormatOptions); - static supportedLocalesOf(locales: string, options?: SupportedLocalesOfOptions): string[]; - static supportedLocalesOf(locales: string[], options?: SupportedLocalesOfOptions): string[]; - format(date: Date): string; - resolvedOptions(): { - locale: string; - calendar: string; - numberingSystem: string; - timeZone: string; - hour12?: boolean; - weekday?: string; - era?: string; - year?: string; - month?: string; - day?: string; - hour?: string; - minute?: string; - second?: string; - timeZoneName?: string; - }; - } - - export interface NumberFormatOptions { - localeMatcher?: string; - style?: string; - currency?: string; - currencyDisplay?: string; - useGrouping?: boolean; - minimumIntegerDigits?: number; - minimumFractionDigits?: number; - maximumFractionDigits?: number; - minimumSignificantDigits?: number; - maximumSignificantDigits?: number; - } - - export class NumberFormat { - constructor(locales?: string, options?: NumberFormatOptions); - constructor(locales?: string[], options?: NumberFormatOptions); - static supportedLocalesOf(locales: string, options?: SupportedLocalesOfOptions): string[]; - static supportedLocalesOf(locales: string[], options?: SupportedLocalesOfOptions): string[]; - format(n: number): string; - resolvedOptions(): { - locale: string; - numberingSystem: string; - style: string; - useGrouping: boolean; - currency?: string; - currencyDisplay?: string; - minimumIntegerDigits?: number; - minimumFractionDigits?: number; - maximumFractionDigits?: number; - minimumSignificantDigits?: number; - maximumSignificantDigits?: number; - } - } -} \ No newline at end of file From 7f6a9c018499dbe9df04eca6d3f8dc2b3c3a450b Mon Sep 17 00:00:00 2001 From: jbaldwin Date: Sat, 24 Aug 2013 16:25:57 -0600 Subject: [PATCH 08/12] Updated onError in require.d.ts --- requirejs/require.d.ts | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/requirejs/require.d.ts b/requirejs/require.d.ts index 39b3d313c..c84334220 100644 --- a/requirejs/require.d.ts +++ b/requirejs/require.d.ts @@ -1,5 +1,5 @@ /* -require-2.1.5.d.ts may be freely distributed under the MIT license. +require-2.1.8.d.ts may be freely distributed under the MIT license. Copyright (c) 2013 Josh Baldwin https://github.com/jbaldwin/require.d.ts @@ -27,7 +27,7 @@ OTHER DEALINGS IN THE SOFTWARE. interface RequireError extends Error { /** - * Error Type + * The error ID that maps to an ID on a web page. **/ requireType: string; @@ -37,7 +37,7 @@ interface RequireError extends Error { requireModules: string[]; /** - * Original error, might be null. + * The original error, if there is one (might be null). **/ originalError: Error; } @@ -180,12 +180,39 @@ interface RequireModule { } +/** +* +**/ interface RequireMap { + + /** + * + **/ prefix: string; + + /** + * + **/ name: string; + + /** + * + **/ parentMap: RequireMap; + + /** + * + **/ url: string; + + /** + * + **/ originalName: string; + + /** + * + **/ fullName: string; } @@ -221,7 +248,7 @@ interface Require { * On Error override * @param err **/ - onError(err: RequireError): void; + onError(err: RequireError, errback?: (err: RequireError) => void): void; /** * Undefine a module From 0caec5769fae42bcfa0222de9b2ca0503b77ad7d Mon Sep 17 00:00:00 2001 From: Diullei Date: Sat, 24 Aug 2013 21:17:53 -0300 Subject: [PATCH 09/12] update test runner to 0.9.1.1 --- _infrastructure/tests/typescript/tsc | 0 _infrastructure/tests/typescript/tsc.js | 2737 +++++++++-------- .../tests/typescript/typescript.js | 2670 ++++++++-------- 3 files changed, 2969 insertions(+), 2438 deletions(-) mode change 100644 => 100755 _infrastructure/tests/typescript/tsc diff --git a/_infrastructure/tests/typescript/tsc b/_infrastructure/tests/typescript/tsc old mode 100644 new mode 100755 diff --git a/_infrastructure/tests/typescript/tsc.js b/_infrastructure/tests/typescript/tsc.js index f366d7171..84cdce466 100644 --- a/_infrastructure/tests/typescript/tsc.js +++ b/_infrastructure/tests/typescript/tsc.js @@ -345,7 +345,9 @@ var TypeScript; Option_mapRoot_cannot_be_specified_without_specifying_sourcemap_option: "Option mapRoot cannot be specified without specifying sourcemap option.", Option_sourceRoot_cannot_be_specified_without_specifying_sourcemap_option: "Option sourceRoot cannot be specified without specifying sourcemap option.", Options_mapRoot_and_sourceRoot_cannot_be_specified_without_specifying_sourcemap_option: "Options mapRoot and sourceRoot cannot be specified without specifying sourcemap option.", - Concatenate_and_emit_output_to_single_file: "Concatenate and emit output to single file", + Option_0_specified_without_1: "Option '{0}' specified without '{1}'", + codepage_option_not_supported_on_current_platform: "'codepage' option not supported on current platform.", + Concatenate_and_emit_output_to_single_file: "Concatenate and emit output to single file.", Generates_corresponding_0_file: "Generates corresponding {0} file", Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: "Specifies the location where debugger should locate map files instead of generated locations.", Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: "Specifies the location where debugger should locate TypeScript files instead of source locations.", @@ -361,7 +363,7 @@ var TypeScript; Specify_locale_for_errors_and_messages_For_example_0_or_1: "Specify locale for errors and messages. For example '{0}' or '{1}'", Syntax_0: "Syntax: {0}", options: "options", - file: "file", + file1: "file", Examples: "Examples:", Options: "Options:", Insert_command_line_options_and_files_from_a_file: "Insert command line options and files from a file.", @@ -370,10 +372,12 @@ var TypeScript; NL_Recompiling_0: "{NL}Recompiling ({0}):", STRING: "STRING", KIND: "KIND", - FILE: "FILE", + file2: "FILE", VERSION: "VERSION", LOCATION: "LOCATION", DIRECTORY: "DIRECTORY", + NUMBER: "NUMBER", + Specify_the_codepage_to_use_when_opening_source_files: "Specify the codepage to use when opening source files.", This_version_of_the_Javascript_runtime_does_not_support_the_0_function: "This version of the Javascript runtime does not support the '{0}' function.", Looking_up_path_for_identifier_token_did_not_result_in_an_identifer: "Looking up path for identifier token did not result in an identifer.", Unknown_rule: "Unknown rule", @@ -389,7 +393,11 @@ var TypeScript; Parameter_0_of_lambda_function_implicitly_has_an_any_type: "Parameter '{0}' of lambda function implicitly has an 'any' type.", Constructor_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: "Constructor signature, which lacks return-type annotation, implicitly has an 'any' return type.", Lambda_Function_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: "Lambda Function, which lacks return-type annotation, implicitly has an 'any' return type.", - Array_Literal_implicitly_has_an_any_type_from_widening: "Array Literal implicitly has an 'any' type from widening." + Array_Literal_implicitly_has_an_any_type_from_widening: "Array Literal implicitly has an 'any' type from widening.", + Use_of_deprecated_type_bool_Use_boolean_instead: "Use of deprecated type 'bool'. Use 'boolean' instead.", + module_is_deprecated_Use_require_instead: "'module(...)' is deprecated. Use 'require(...)' instead.", + Allow_bool_as_a_synonym_for_boolean: "Allow 'bool' as a synonym for 'boolean'.", + Allow_module_as_a_synonym_for_require: "Allow 'module(...)' as a synonym for 'require(...)'." }; })(TypeScript || (TypeScript = {})); var TypeScript; @@ -1068,18 +1076,16 @@ var TypeScript; function getDiagnosticInfoFromKey(diagnosticKey) { var result = TypeScript.diagnosticInformationMap[diagnosticKey]; - TypeScript.Debug.assert(result !== undefined && result !== null); + return result; } TypeScript.getDiagnosticInfoFromKey = getDiagnosticInfoFromKey; function getLocalizedText(diagnosticKey, args) { if (TypeScript.LocalizedDiagnosticMessages) { - TypeScript.Debug.assert(TypeScript.LocalizedDiagnosticMessages.hasOwnProperty(diagnosticKey)); } var diagnosticMessageText = TypeScript.LocalizedDiagnosticMessages ? TypeScript.LocalizedDiagnosticMessages[diagnosticKey] : diagnosticKey; - TypeScript.Debug.assert(diagnosticMessageText !== undefined && diagnosticMessageText !== null); var actualCount = args ? args.length : 0; @@ -1178,8 +1184,19 @@ var Environment = (function () { currentDirectory: function () { return (WScript).CreateObject("WScript.Shell").CurrentDirectory; }, - readFile: function (path) { + supportsCodePage: function () { + return (WScript).ReadFile; + }, + readFile: function (path, codepage) { try { + if (codepage !== null && this.supportsCodePage()) { + try { + var contents = (WScript).ReadFile(path, codepage); + return new FileInformation(contents, 0 /* None */); + } catch (e) { + } + } + var streamObj = getStreamObject(); streamObj.Open(); streamObj.Type = 2; @@ -1304,7 +1321,14 @@ var Environment = (function () { currentDirectory: function () { return (process).cwd(); }, - readFile: function (file) { + supportsCodePage: function () { + return false; + }, + readFile: function (file, codepage) { + if (codepage !== null) { + throw new Error(TypeScript.getDiagnosticMessage(TypeScript.DiagnosticCode.codepage_option_not_supported_on_current_platform, null)); + } + var buffer = _fs.readFileSync(file); switch (buffer[0]) { case 0xFE: @@ -2986,7 +3010,15 @@ var TypeScript; "code": 5040, "category": 1 /* Error */ }, - "Concatenate and emit output to single file": { + "Option '{0}' specified without '{1}'": { + "code": 5041, + "category": 1 /* Error */ + }, + "'codepage' option not supported on current platform.": { + "code": 5042, + "category": 1 /* Error */ + }, + "Concatenate and emit output to single file.": { "code": 6001, "category": 2 /* Message */ }, @@ -3050,7 +3082,7 @@ var TypeScript; "code": 6024, "category": 2 /* Message */ }, - "file": { + "file1": { "code": 6025, "category": 2 /* Message */ }, @@ -3086,7 +3118,7 @@ var TypeScript; "code": 6034, "category": 2 /* Message */ }, - "FILE": { + "file2": { "code": 6035, "category": 2 /* Message */ }, @@ -3102,6 +3134,14 @@ var TypeScript; "code": 6038, "category": 2 /* Message */ }, + "NUMBER": { + "code": 6039, + "category": 2 /* Message */ + }, + "Specify the codepage to use when opening source files.": { + "code": 6040, + "category": 2 /* Message */ + }, "This version of the Javascript runtime does not support the '{0}' function.": { "code": 7000, "category": 1 /* Error */ @@ -3165,6 +3205,22 @@ var TypeScript; "Array Literal implicitly has an 'any' type from widening.": { "code": 7014, "category": 1 /* Error */ + }, + "Use of deprecated type 'bool'. Use 'boolean' instead.": { + "code": 7020, + "category": 0 /* Warning */ + }, + "'module(...)' is deprecated. Use 'require(...)' instead.": { + "code": 7021, + "category": 0 /* Warning */ + }, + "Allow 'bool' as a synonym for 'boolean'.": { + "code": 7022, + "category": 2 /* Message */ + }, + "Allow 'module(...)' as a synonym for 'require(...)'.": { + "code": 7022, + "category": 2 /* Message */ } }; })(TypeScript || (TypeScript = {})); @@ -4361,12 +4417,16 @@ var TypeScript; var TypeScript; (function (TypeScript) { var ParseOptions = (function () { - function ParseOptions(languageVersion, allowAutomaticSemicolonInsertion) { + function ParseOptions(languageVersion, allowAutomaticSemicolonInsertion, allowModuleKeywordInExternalModuleReference) { this._languageVersion = languageVersion; this._allowAutomaticSemicolonInsertion = allowAutomaticSemicolonInsertion; + this._allowModuleKeywordInExternalModuleReference = allowModuleKeywordInExternalModuleReference; } ParseOptions.prototype.toJSON = function (key) { - return { allowAutomaticSemicolonInsertion: this._allowAutomaticSemicolonInsertion }; + return { + allowAutomaticSemicolonInsertion: this._allowAutomaticSemicolonInsertion, + allowModuleKeywordInExternalModuleReference: this._allowModuleKeywordInExternalModuleReference + }; }; ParseOptions.prototype.languageVersion = function () { @@ -4376,6 +4436,10 @@ var TypeScript; ParseOptions.prototype.allowAutomaticSemicolonInsertion = function () { return this._allowAutomaticSemicolonInsertion; }; + + ParseOptions.prototype.allowModuleKeywordInExternalModuleReference = function () { + return this._allowModuleKeywordInExternalModuleReference; + }; return ParseOptions; })(); TypeScript.ParseOptions = ParseOptions; @@ -4757,206 +4821,207 @@ var TypeScript; SyntaxKind[SyntaxKind["AnyKeyword"] = 60] = "AnyKeyword"; SyntaxKind[SyntaxKind["BooleanKeyword"] = 61] = "BooleanKeyword"; - SyntaxKind[SyntaxKind["ConstructorKeyword"] = 62] = "ConstructorKeyword"; - SyntaxKind[SyntaxKind["DeclareKeyword"] = 63] = "DeclareKeyword"; - SyntaxKind[SyntaxKind["GetKeyword"] = 64] = "GetKeyword"; - SyntaxKind[SyntaxKind["ModuleKeyword"] = 65] = "ModuleKeyword"; - SyntaxKind[SyntaxKind["RequireKeyword"] = 66] = "RequireKeyword"; - SyntaxKind[SyntaxKind["NumberKeyword"] = 67] = "NumberKeyword"; - SyntaxKind[SyntaxKind["SetKeyword"] = 68] = "SetKeyword"; - SyntaxKind[SyntaxKind["StringKeyword"] = 69] = "StringKeyword"; + SyntaxKind[SyntaxKind["BoolKeyword"] = 62] = "BoolKeyword"; + SyntaxKind[SyntaxKind["ConstructorKeyword"] = 63] = "ConstructorKeyword"; + SyntaxKind[SyntaxKind["DeclareKeyword"] = 64] = "DeclareKeyword"; + SyntaxKind[SyntaxKind["GetKeyword"] = 65] = "GetKeyword"; + SyntaxKind[SyntaxKind["ModuleKeyword"] = 66] = "ModuleKeyword"; + SyntaxKind[SyntaxKind["RequireKeyword"] = 67] = "RequireKeyword"; + SyntaxKind[SyntaxKind["NumberKeyword"] = 68] = "NumberKeyword"; + SyntaxKind[SyntaxKind["SetKeyword"] = 69] = "SetKeyword"; + SyntaxKind[SyntaxKind["StringKeyword"] = 70] = "StringKeyword"; - SyntaxKind[SyntaxKind["OpenBraceToken"] = 70] = "OpenBraceToken"; - SyntaxKind[SyntaxKind["CloseBraceToken"] = 71] = "CloseBraceToken"; - SyntaxKind[SyntaxKind["OpenParenToken"] = 72] = "OpenParenToken"; - SyntaxKind[SyntaxKind["CloseParenToken"] = 73] = "CloseParenToken"; - SyntaxKind[SyntaxKind["OpenBracketToken"] = 74] = "OpenBracketToken"; - SyntaxKind[SyntaxKind["CloseBracketToken"] = 75] = "CloseBracketToken"; - SyntaxKind[SyntaxKind["DotToken"] = 76] = "DotToken"; - SyntaxKind[SyntaxKind["DotDotDotToken"] = 77] = "DotDotDotToken"; - SyntaxKind[SyntaxKind["SemicolonToken"] = 78] = "SemicolonToken"; - SyntaxKind[SyntaxKind["CommaToken"] = 79] = "CommaToken"; - SyntaxKind[SyntaxKind["LessThanToken"] = 80] = "LessThanToken"; - SyntaxKind[SyntaxKind["GreaterThanToken"] = 81] = "GreaterThanToken"; - SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 82] = "LessThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 83] = "GreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 84] = "EqualsEqualsToken"; - SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 85] = "EqualsGreaterThanToken"; - SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 86] = "ExclamationEqualsToken"; - SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 87] = "EqualsEqualsEqualsToken"; - SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 88] = "ExclamationEqualsEqualsToken"; - SyntaxKind[SyntaxKind["PlusToken"] = 89] = "PlusToken"; - SyntaxKind[SyntaxKind["MinusToken"] = 90] = "MinusToken"; - SyntaxKind[SyntaxKind["AsteriskToken"] = 91] = "AsteriskToken"; - SyntaxKind[SyntaxKind["PercentToken"] = 92] = "PercentToken"; - SyntaxKind[SyntaxKind["PlusPlusToken"] = 93] = "PlusPlusToken"; - SyntaxKind[SyntaxKind["MinusMinusToken"] = 94] = "MinusMinusToken"; - SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 95] = "LessThanLessThanToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 96] = "GreaterThanGreaterThanToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 97] = "GreaterThanGreaterThanGreaterThanToken"; - SyntaxKind[SyntaxKind["AmpersandToken"] = 98] = "AmpersandToken"; - SyntaxKind[SyntaxKind["BarToken"] = 99] = "BarToken"; - SyntaxKind[SyntaxKind["CaretToken"] = 100] = "CaretToken"; - SyntaxKind[SyntaxKind["ExclamationToken"] = 101] = "ExclamationToken"; - SyntaxKind[SyntaxKind["TildeToken"] = 102] = "TildeToken"; - SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 103] = "AmpersandAmpersandToken"; - SyntaxKind[SyntaxKind["BarBarToken"] = 104] = "BarBarToken"; - SyntaxKind[SyntaxKind["QuestionToken"] = 105] = "QuestionToken"; - SyntaxKind[SyntaxKind["ColonToken"] = 106] = "ColonToken"; - SyntaxKind[SyntaxKind["EqualsToken"] = 107] = "EqualsToken"; - SyntaxKind[SyntaxKind["PlusEqualsToken"] = 108] = "PlusEqualsToken"; - SyntaxKind[SyntaxKind["MinusEqualsToken"] = 109] = "MinusEqualsToken"; - SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 110] = "AsteriskEqualsToken"; - SyntaxKind[SyntaxKind["PercentEqualsToken"] = 111] = "PercentEqualsToken"; - SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 112] = "LessThanLessThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 113] = "GreaterThanGreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 114] = "GreaterThanGreaterThanGreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 115] = "AmpersandEqualsToken"; - SyntaxKind[SyntaxKind["BarEqualsToken"] = 116] = "BarEqualsToken"; - SyntaxKind[SyntaxKind["CaretEqualsToken"] = 117] = "CaretEqualsToken"; - SyntaxKind[SyntaxKind["SlashToken"] = 118] = "SlashToken"; - SyntaxKind[SyntaxKind["SlashEqualsToken"] = 119] = "SlashEqualsToken"; + SyntaxKind[SyntaxKind["OpenBraceToken"] = 71] = "OpenBraceToken"; + SyntaxKind[SyntaxKind["CloseBraceToken"] = 72] = "CloseBraceToken"; + SyntaxKind[SyntaxKind["OpenParenToken"] = 73] = "OpenParenToken"; + SyntaxKind[SyntaxKind["CloseParenToken"] = 74] = "CloseParenToken"; + SyntaxKind[SyntaxKind["OpenBracketToken"] = 75] = "OpenBracketToken"; + SyntaxKind[SyntaxKind["CloseBracketToken"] = 76] = "CloseBracketToken"; + SyntaxKind[SyntaxKind["DotToken"] = 77] = "DotToken"; + SyntaxKind[SyntaxKind["DotDotDotToken"] = 78] = "DotDotDotToken"; + SyntaxKind[SyntaxKind["SemicolonToken"] = 79] = "SemicolonToken"; + SyntaxKind[SyntaxKind["CommaToken"] = 80] = "CommaToken"; + SyntaxKind[SyntaxKind["LessThanToken"] = 81] = "LessThanToken"; + SyntaxKind[SyntaxKind["GreaterThanToken"] = 82] = "GreaterThanToken"; + SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 83] = "LessThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 84] = "GreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 85] = "EqualsEqualsToken"; + SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 86] = "EqualsGreaterThanToken"; + SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 87] = "ExclamationEqualsToken"; + SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 88] = "EqualsEqualsEqualsToken"; + SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 89] = "ExclamationEqualsEqualsToken"; + SyntaxKind[SyntaxKind["PlusToken"] = 90] = "PlusToken"; + SyntaxKind[SyntaxKind["MinusToken"] = 91] = "MinusToken"; + SyntaxKind[SyntaxKind["AsteriskToken"] = 92] = "AsteriskToken"; + SyntaxKind[SyntaxKind["PercentToken"] = 93] = "PercentToken"; + SyntaxKind[SyntaxKind["PlusPlusToken"] = 94] = "PlusPlusToken"; + SyntaxKind[SyntaxKind["MinusMinusToken"] = 95] = "MinusMinusToken"; + SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 96] = "LessThanLessThanToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 97] = "GreaterThanGreaterThanToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 98] = "GreaterThanGreaterThanGreaterThanToken"; + SyntaxKind[SyntaxKind["AmpersandToken"] = 99] = "AmpersandToken"; + SyntaxKind[SyntaxKind["BarToken"] = 100] = "BarToken"; + SyntaxKind[SyntaxKind["CaretToken"] = 101] = "CaretToken"; + SyntaxKind[SyntaxKind["ExclamationToken"] = 102] = "ExclamationToken"; + SyntaxKind[SyntaxKind["TildeToken"] = 103] = "TildeToken"; + SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 104] = "AmpersandAmpersandToken"; + SyntaxKind[SyntaxKind["BarBarToken"] = 105] = "BarBarToken"; + SyntaxKind[SyntaxKind["QuestionToken"] = 106] = "QuestionToken"; + SyntaxKind[SyntaxKind["ColonToken"] = 107] = "ColonToken"; + SyntaxKind[SyntaxKind["EqualsToken"] = 108] = "EqualsToken"; + SyntaxKind[SyntaxKind["PlusEqualsToken"] = 109] = "PlusEqualsToken"; + SyntaxKind[SyntaxKind["MinusEqualsToken"] = 110] = "MinusEqualsToken"; + SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 111] = "AsteriskEqualsToken"; + SyntaxKind[SyntaxKind["PercentEqualsToken"] = 112] = "PercentEqualsToken"; + SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 113] = "LessThanLessThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 114] = "GreaterThanGreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 115] = "GreaterThanGreaterThanGreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 116] = "AmpersandEqualsToken"; + SyntaxKind[SyntaxKind["BarEqualsToken"] = 117] = "BarEqualsToken"; + SyntaxKind[SyntaxKind["CaretEqualsToken"] = 118] = "CaretEqualsToken"; + SyntaxKind[SyntaxKind["SlashToken"] = 119] = "SlashToken"; + SyntaxKind[SyntaxKind["SlashEqualsToken"] = 120] = "SlashEqualsToken"; - SyntaxKind[SyntaxKind["SourceUnit"] = 120] = "SourceUnit"; + SyntaxKind[SyntaxKind["SourceUnit"] = 121] = "SourceUnit"; - SyntaxKind[SyntaxKind["QualifiedName"] = 121] = "QualifiedName"; + SyntaxKind[SyntaxKind["QualifiedName"] = 122] = "QualifiedName"; - SyntaxKind[SyntaxKind["ObjectType"] = 122] = "ObjectType"; - SyntaxKind[SyntaxKind["FunctionType"] = 123] = "FunctionType"; - SyntaxKind[SyntaxKind["ArrayType"] = 124] = "ArrayType"; - SyntaxKind[SyntaxKind["ConstructorType"] = 125] = "ConstructorType"; - SyntaxKind[SyntaxKind["GenericType"] = 126] = "GenericType"; - SyntaxKind[SyntaxKind["TypeQuery"] = 127] = "TypeQuery"; + SyntaxKind[SyntaxKind["ObjectType"] = 123] = "ObjectType"; + SyntaxKind[SyntaxKind["FunctionType"] = 124] = "FunctionType"; + SyntaxKind[SyntaxKind["ArrayType"] = 125] = "ArrayType"; + SyntaxKind[SyntaxKind["ConstructorType"] = 126] = "ConstructorType"; + SyntaxKind[SyntaxKind["GenericType"] = 127] = "GenericType"; + SyntaxKind[SyntaxKind["TypeQuery"] = 128] = "TypeQuery"; - SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 128] = "InterfaceDeclaration"; - SyntaxKind[SyntaxKind["FunctionDeclaration"] = 129] = "FunctionDeclaration"; - SyntaxKind[SyntaxKind["ModuleDeclaration"] = 130] = "ModuleDeclaration"; - SyntaxKind[SyntaxKind["ClassDeclaration"] = 131] = "ClassDeclaration"; - SyntaxKind[SyntaxKind["EnumDeclaration"] = 132] = "EnumDeclaration"; - SyntaxKind[SyntaxKind["ImportDeclaration"] = 133] = "ImportDeclaration"; - SyntaxKind[SyntaxKind["ExportAssignment"] = 134] = "ExportAssignment"; + SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 129] = "InterfaceDeclaration"; + SyntaxKind[SyntaxKind["FunctionDeclaration"] = 130] = "FunctionDeclaration"; + SyntaxKind[SyntaxKind["ModuleDeclaration"] = 131] = "ModuleDeclaration"; + SyntaxKind[SyntaxKind["ClassDeclaration"] = 132] = "ClassDeclaration"; + SyntaxKind[SyntaxKind["EnumDeclaration"] = 133] = "EnumDeclaration"; + SyntaxKind[SyntaxKind["ImportDeclaration"] = 134] = "ImportDeclaration"; + SyntaxKind[SyntaxKind["ExportAssignment"] = 135] = "ExportAssignment"; - SyntaxKind[SyntaxKind["MemberFunctionDeclaration"] = 135] = "MemberFunctionDeclaration"; - SyntaxKind[SyntaxKind["MemberVariableDeclaration"] = 136] = "MemberVariableDeclaration"; - SyntaxKind[SyntaxKind["ConstructorDeclaration"] = 137] = "ConstructorDeclaration"; - SyntaxKind[SyntaxKind["GetMemberAccessorDeclaration"] = 138] = "GetMemberAccessorDeclaration"; - SyntaxKind[SyntaxKind["SetMemberAccessorDeclaration"] = 139] = "SetMemberAccessorDeclaration"; + SyntaxKind[SyntaxKind["MemberFunctionDeclaration"] = 136] = "MemberFunctionDeclaration"; + SyntaxKind[SyntaxKind["MemberVariableDeclaration"] = 137] = "MemberVariableDeclaration"; + SyntaxKind[SyntaxKind["ConstructorDeclaration"] = 138] = "ConstructorDeclaration"; + SyntaxKind[SyntaxKind["GetMemberAccessorDeclaration"] = 139] = "GetMemberAccessorDeclaration"; + SyntaxKind[SyntaxKind["SetMemberAccessorDeclaration"] = 140] = "SetMemberAccessorDeclaration"; - SyntaxKind[SyntaxKind["PropertySignature"] = 140] = "PropertySignature"; - SyntaxKind[SyntaxKind["CallSignature"] = 141] = "CallSignature"; - SyntaxKind[SyntaxKind["ConstructSignature"] = 142] = "ConstructSignature"; - SyntaxKind[SyntaxKind["IndexSignature"] = 143] = "IndexSignature"; - SyntaxKind[SyntaxKind["MethodSignature"] = 144] = "MethodSignature"; + SyntaxKind[SyntaxKind["PropertySignature"] = 141] = "PropertySignature"; + SyntaxKind[SyntaxKind["CallSignature"] = 142] = "CallSignature"; + SyntaxKind[SyntaxKind["ConstructSignature"] = 143] = "ConstructSignature"; + SyntaxKind[SyntaxKind["IndexSignature"] = 144] = "IndexSignature"; + SyntaxKind[SyntaxKind["MethodSignature"] = 145] = "MethodSignature"; - SyntaxKind[SyntaxKind["Block"] = 145] = "Block"; - SyntaxKind[SyntaxKind["IfStatement"] = 146] = "IfStatement"; - SyntaxKind[SyntaxKind["VariableStatement"] = 147] = "VariableStatement"; - SyntaxKind[SyntaxKind["ExpressionStatement"] = 148] = "ExpressionStatement"; - SyntaxKind[SyntaxKind["ReturnStatement"] = 149] = "ReturnStatement"; - SyntaxKind[SyntaxKind["SwitchStatement"] = 150] = "SwitchStatement"; - SyntaxKind[SyntaxKind["BreakStatement"] = 151] = "BreakStatement"; - SyntaxKind[SyntaxKind["ContinueStatement"] = 152] = "ContinueStatement"; - SyntaxKind[SyntaxKind["ForStatement"] = 153] = "ForStatement"; - SyntaxKind[SyntaxKind["ForInStatement"] = 154] = "ForInStatement"; - SyntaxKind[SyntaxKind["EmptyStatement"] = 155] = "EmptyStatement"; - SyntaxKind[SyntaxKind["ThrowStatement"] = 156] = "ThrowStatement"; - SyntaxKind[SyntaxKind["WhileStatement"] = 157] = "WhileStatement"; - SyntaxKind[SyntaxKind["TryStatement"] = 158] = "TryStatement"; - SyntaxKind[SyntaxKind["LabeledStatement"] = 159] = "LabeledStatement"; - SyntaxKind[SyntaxKind["DoStatement"] = 160] = "DoStatement"; - SyntaxKind[SyntaxKind["DebuggerStatement"] = 161] = "DebuggerStatement"; - SyntaxKind[SyntaxKind["WithStatement"] = 162] = "WithStatement"; + SyntaxKind[SyntaxKind["Block"] = 146] = "Block"; + SyntaxKind[SyntaxKind["IfStatement"] = 147] = "IfStatement"; + SyntaxKind[SyntaxKind["VariableStatement"] = 148] = "VariableStatement"; + SyntaxKind[SyntaxKind["ExpressionStatement"] = 149] = "ExpressionStatement"; + SyntaxKind[SyntaxKind["ReturnStatement"] = 150] = "ReturnStatement"; + SyntaxKind[SyntaxKind["SwitchStatement"] = 151] = "SwitchStatement"; + SyntaxKind[SyntaxKind["BreakStatement"] = 152] = "BreakStatement"; + SyntaxKind[SyntaxKind["ContinueStatement"] = 153] = "ContinueStatement"; + SyntaxKind[SyntaxKind["ForStatement"] = 154] = "ForStatement"; + SyntaxKind[SyntaxKind["ForInStatement"] = 155] = "ForInStatement"; + SyntaxKind[SyntaxKind["EmptyStatement"] = 156] = "EmptyStatement"; + SyntaxKind[SyntaxKind["ThrowStatement"] = 157] = "ThrowStatement"; + SyntaxKind[SyntaxKind["WhileStatement"] = 158] = "WhileStatement"; + SyntaxKind[SyntaxKind["TryStatement"] = 159] = "TryStatement"; + SyntaxKind[SyntaxKind["LabeledStatement"] = 160] = "LabeledStatement"; + SyntaxKind[SyntaxKind["DoStatement"] = 161] = "DoStatement"; + SyntaxKind[SyntaxKind["DebuggerStatement"] = 162] = "DebuggerStatement"; + SyntaxKind[SyntaxKind["WithStatement"] = 163] = "WithStatement"; - SyntaxKind[SyntaxKind["PlusExpression"] = 163] = "PlusExpression"; - SyntaxKind[SyntaxKind["NegateExpression"] = 164] = "NegateExpression"; - SyntaxKind[SyntaxKind["BitwiseNotExpression"] = 165] = "BitwiseNotExpression"; - SyntaxKind[SyntaxKind["LogicalNotExpression"] = 166] = "LogicalNotExpression"; - SyntaxKind[SyntaxKind["PreIncrementExpression"] = 167] = "PreIncrementExpression"; - SyntaxKind[SyntaxKind["PreDecrementExpression"] = 168] = "PreDecrementExpression"; - SyntaxKind[SyntaxKind["DeleteExpression"] = 169] = "DeleteExpression"; - SyntaxKind[SyntaxKind["TypeOfExpression"] = 170] = "TypeOfExpression"; - SyntaxKind[SyntaxKind["VoidExpression"] = 171] = "VoidExpression"; - SyntaxKind[SyntaxKind["CommaExpression"] = 172] = "CommaExpression"; - SyntaxKind[SyntaxKind["AssignmentExpression"] = 173] = "AssignmentExpression"; - SyntaxKind[SyntaxKind["AddAssignmentExpression"] = 174] = "AddAssignmentExpression"; - SyntaxKind[SyntaxKind["SubtractAssignmentExpression"] = 175] = "SubtractAssignmentExpression"; - SyntaxKind[SyntaxKind["MultiplyAssignmentExpression"] = 176] = "MultiplyAssignmentExpression"; - SyntaxKind[SyntaxKind["DivideAssignmentExpression"] = 177] = "DivideAssignmentExpression"; - SyntaxKind[SyntaxKind["ModuloAssignmentExpression"] = 178] = "ModuloAssignmentExpression"; - SyntaxKind[SyntaxKind["AndAssignmentExpression"] = 179] = "AndAssignmentExpression"; - SyntaxKind[SyntaxKind["ExclusiveOrAssignmentExpression"] = 180] = "ExclusiveOrAssignmentExpression"; - SyntaxKind[SyntaxKind["OrAssignmentExpression"] = 181] = "OrAssignmentExpression"; - SyntaxKind[SyntaxKind["LeftShiftAssignmentExpression"] = 182] = "LeftShiftAssignmentExpression"; - SyntaxKind[SyntaxKind["SignedRightShiftAssignmentExpression"] = 183] = "SignedRightShiftAssignmentExpression"; - SyntaxKind[SyntaxKind["UnsignedRightShiftAssignmentExpression"] = 184] = "UnsignedRightShiftAssignmentExpression"; - SyntaxKind[SyntaxKind["ConditionalExpression"] = 185] = "ConditionalExpression"; - SyntaxKind[SyntaxKind["LogicalOrExpression"] = 186] = "LogicalOrExpression"; - SyntaxKind[SyntaxKind["LogicalAndExpression"] = 187] = "LogicalAndExpression"; - SyntaxKind[SyntaxKind["BitwiseOrExpression"] = 188] = "BitwiseOrExpression"; - SyntaxKind[SyntaxKind["BitwiseExclusiveOrExpression"] = 189] = "BitwiseExclusiveOrExpression"; - SyntaxKind[SyntaxKind["BitwiseAndExpression"] = 190] = "BitwiseAndExpression"; - SyntaxKind[SyntaxKind["EqualsWithTypeConversionExpression"] = 191] = "EqualsWithTypeConversionExpression"; - SyntaxKind[SyntaxKind["NotEqualsWithTypeConversionExpression"] = 192] = "NotEqualsWithTypeConversionExpression"; - SyntaxKind[SyntaxKind["EqualsExpression"] = 193] = "EqualsExpression"; - SyntaxKind[SyntaxKind["NotEqualsExpression"] = 194] = "NotEqualsExpression"; - SyntaxKind[SyntaxKind["LessThanExpression"] = 195] = "LessThanExpression"; - SyntaxKind[SyntaxKind["GreaterThanExpression"] = 196] = "GreaterThanExpression"; - SyntaxKind[SyntaxKind["LessThanOrEqualExpression"] = 197] = "LessThanOrEqualExpression"; - SyntaxKind[SyntaxKind["GreaterThanOrEqualExpression"] = 198] = "GreaterThanOrEqualExpression"; - SyntaxKind[SyntaxKind["InstanceOfExpression"] = 199] = "InstanceOfExpression"; - SyntaxKind[SyntaxKind["InExpression"] = 200] = "InExpression"; - SyntaxKind[SyntaxKind["LeftShiftExpression"] = 201] = "LeftShiftExpression"; - SyntaxKind[SyntaxKind["SignedRightShiftExpression"] = 202] = "SignedRightShiftExpression"; - SyntaxKind[SyntaxKind["UnsignedRightShiftExpression"] = 203] = "UnsignedRightShiftExpression"; - SyntaxKind[SyntaxKind["MultiplyExpression"] = 204] = "MultiplyExpression"; - SyntaxKind[SyntaxKind["DivideExpression"] = 205] = "DivideExpression"; - SyntaxKind[SyntaxKind["ModuloExpression"] = 206] = "ModuloExpression"; - SyntaxKind[SyntaxKind["AddExpression"] = 207] = "AddExpression"; - SyntaxKind[SyntaxKind["SubtractExpression"] = 208] = "SubtractExpression"; - SyntaxKind[SyntaxKind["PostIncrementExpression"] = 209] = "PostIncrementExpression"; - SyntaxKind[SyntaxKind["PostDecrementExpression"] = 210] = "PostDecrementExpression"; - SyntaxKind[SyntaxKind["MemberAccessExpression"] = 211] = "MemberAccessExpression"; - SyntaxKind[SyntaxKind["InvocationExpression"] = 212] = "InvocationExpression"; - SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 213] = "ArrayLiteralExpression"; - SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 214] = "ObjectLiteralExpression"; - SyntaxKind[SyntaxKind["ObjectCreationExpression"] = 215] = "ObjectCreationExpression"; - SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 216] = "ParenthesizedExpression"; - SyntaxKind[SyntaxKind["ParenthesizedArrowFunctionExpression"] = 217] = "ParenthesizedArrowFunctionExpression"; - SyntaxKind[SyntaxKind["SimpleArrowFunctionExpression"] = 218] = "SimpleArrowFunctionExpression"; - SyntaxKind[SyntaxKind["CastExpression"] = 219] = "CastExpression"; - SyntaxKind[SyntaxKind["ElementAccessExpression"] = 220] = "ElementAccessExpression"; - SyntaxKind[SyntaxKind["FunctionExpression"] = 221] = "FunctionExpression"; - SyntaxKind[SyntaxKind["OmittedExpression"] = 222] = "OmittedExpression"; + SyntaxKind[SyntaxKind["PlusExpression"] = 164] = "PlusExpression"; + SyntaxKind[SyntaxKind["NegateExpression"] = 165] = "NegateExpression"; + SyntaxKind[SyntaxKind["BitwiseNotExpression"] = 166] = "BitwiseNotExpression"; + SyntaxKind[SyntaxKind["LogicalNotExpression"] = 167] = "LogicalNotExpression"; + SyntaxKind[SyntaxKind["PreIncrementExpression"] = 168] = "PreIncrementExpression"; + SyntaxKind[SyntaxKind["PreDecrementExpression"] = 169] = "PreDecrementExpression"; + SyntaxKind[SyntaxKind["DeleteExpression"] = 170] = "DeleteExpression"; + SyntaxKind[SyntaxKind["TypeOfExpression"] = 171] = "TypeOfExpression"; + SyntaxKind[SyntaxKind["VoidExpression"] = 172] = "VoidExpression"; + SyntaxKind[SyntaxKind["CommaExpression"] = 173] = "CommaExpression"; + SyntaxKind[SyntaxKind["AssignmentExpression"] = 174] = "AssignmentExpression"; + SyntaxKind[SyntaxKind["AddAssignmentExpression"] = 175] = "AddAssignmentExpression"; + SyntaxKind[SyntaxKind["SubtractAssignmentExpression"] = 176] = "SubtractAssignmentExpression"; + SyntaxKind[SyntaxKind["MultiplyAssignmentExpression"] = 177] = "MultiplyAssignmentExpression"; + SyntaxKind[SyntaxKind["DivideAssignmentExpression"] = 178] = "DivideAssignmentExpression"; + SyntaxKind[SyntaxKind["ModuloAssignmentExpression"] = 179] = "ModuloAssignmentExpression"; + SyntaxKind[SyntaxKind["AndAssignmentExpression"] = 180] = "AndAssignmentExpression"; + SyntaxKind[SyntaxKind["ExclusiveOrAssignmentExpression"] = 181] = "ExclusiveOrAssignmentExpression"; + SyntaxKind[SyntaxKind["OrAssignmentExpression"] = 182] = "OrAssignmentExpression"; + SyntaxKind[SyntaxKind["LeftShiftAssignmentExpression"] = 183] = "LeftShiftAssignmentExpression"; + SyntaxKind[SyntaxKind["SignedRightShiftAssignmentExpression"] = 184] = "SignedRightShiftAssignmentExpression"; + SyntaxKind[SyntaxKind["UnsignedRightShiftAssignmentExpression"] = 185] = "UnsignedRightShiftAssignmentExpression"; + SyntaxKind[SyntaxKind["ConditionalExpression"] = 186] = "ConditionalExpression"; + SyntaxKind[SyntaxKind["LogicalOrExpression"] = 187] = "LogicalOrExpression"; + SyntaxKind[SyntaxKind["LogicalAndExpression"] = 188] = "LogicalAndExpression"; + SyntaxKind[SyntaxKind["BitwiseOrExpression"] = 189] = "BitwiseOrExpression"; + SyntaxKind[SyntaxKind["BitwiseExclusiveOrExpression"] = 190] = "BitwiseExclusiveOrExpression"; + SyntaxKind[SyntaxKind["BitwiseAndExpression"] = 191] = "BitwiseAndExpression"; + SyntaxKind[SyntaxKind["EqualsWithTypeConversionExpression"] = 192] = "EqualsWithTypeConversionExpression"; + SyntaxKind[SyntaxKind["NotEqualsWithTypeConversionExpression"] = 193] = "NotEqualsWithTypeConversionExpression"; + SyntaxKind[SyntaxKind["EqualsExpression"] = 194] = "EqualsExpression"; + SyntaxKind[SyntaxKind["NotEqualsExpression"] = 195] = "NotEqualsExpression"; + SyntaxKind[SyntaxKind["LessThanExpression"] = 196] = "LessThanExpression"; + SyntaxKind[SyntaxKind["GreaterThanExpression"] = 197] = "GreaterThanExpression"; + SyntaxKind[SyntaxKind["LessThanOrEqualExpression"] = 198] = "LessThanOrEqualExpression"; + SyntaxKind[SyntaxKind["GreaterThanOrEqualExpression"] = 199] = "GreaterThanOrEqualExpression"; + SyntaxKind[SyntaxKind["InstanceOfExpression"] = 200] = "InstanceOfExpression"; + SyntaxKind[SyntaxKind["InExpression"] = 201] = "InExpression"; + SyntaxKind[SyntaxKind["LeftShiftExpression"] = 202] = "LeftShiftExpression"; + SyntaxKind[SyntaxKind["SignedRightShiftExpression"] = 203] = "SignedRightShiftExpression"; + SyntaxKind[SyntaxKind["UnsignedRightShiftExpression"] = 204] = "UnsignedRightShiftExpression"; + SyntaxKind[SyntaxKind["MultiplyExpression"] = 205] = "MultiplyExpression"; + SyntaxKind[SyntaxKind["DivideExpression"] = 206] = "DivideExpression"; + SyntaxKind[SyntaxKind["ModuloExpression"] = 207] = "ModuloExpression"; + SyntaxKind[SyntaxKind["AddExpression"] = 208] = "AddExpression"; + SyntaxKind[SyntaxKind["SubtractExpression"] = 209] = "SubtractExpression"; + SyntaxKind[SyntaxKind["PostIncrementExpression"] = 210] = "PostIncrementExpression"; + SyntaxKind[SyntaxKind["PostDecrementExpression"] = 211] = "PostDecrementExpression"; + SyntaxKind[SyntaxKind["MemberAccessExpression"] = 212] = "MemberAccessExpression"; + SyntaxKind[SyntaxKind["InvocationExpression"] = 213] = "InvocationExpression"; + SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 214] = "ArrayLiteralExpression"; + SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 215] = "ObjectLiteralExpression"; + SyntaxKind[SyntaxKind["ObjectCreationExpression"] = 216] = "ObjectCreationExpression"; + SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 217] = "ParenthesizedExpression"; + SyntaxKind[SyntaxKind["ParenthesizedArrowFunctionExpression"] = 218] = "ParenthesizedArrowFunctionExpression"; + SyntaxKind[SyntaxKind["SimpleArrowFunctionExpression"] = 219] = "SimpleArrowFunctionExpression"; + SyntaxKind[SyntaxKind["CastExpression"] = 220] = "CastExpression"; + SyntaxKind[SyntaxKind["ElementAccessExpression"] = 221] = "ElementAccessExpression"; + SyntaxKind[SyntaxKind["FunctionExpression"] = 222] = "FunctionExpression"; + SyntaxKind[SyntaxKind["OmittedExpression"] = 223] = "OmittedExpression"; - SyntaxKind[SyntaxKind["VariableDeclaration"] = 223] = "VariableDeclaration"; - SyntaxKind[SyntaxKind["VariableDeclarator"] = 224] = "VariableDeclarator"; + SyntaxKind[SyntaxKind["VariableDeclaration"] = 224] = "VariableDeclaration"; + SyntaxKind[SyntaxKind["VariableDeclarator"] = 225] = "VariableDeclarator"; - SyntaxKind[SyntaxKind["ArgumentList"] = 225] = "ArgumentList"; - SyntaxKind[SyntaxKind["ParameterList"] = 226] = "ParameterList"; - SyntaxKind[SyntaxKind["TypeArgumentList"] = 227] = "TypeArgumentList"; - SyntaxKind[SyntaxKind["TypeParameterList"] = 228] = "TypeParameterList"; + SyntaxKind[SyntaxKind["ArgumentList"] = 226] = "ArgumentList"; + SyntaxKind[SyntaxKind["ParameterList"] = 227] = "ParameterList"; + SyntaxKind[SyntaxKind["TypeArgumentList"] = 228] = "TypeArgumentList"; + SyntaxKind[SyntaxKind["TypeParameterList"] = 229] = "TypeParameterList"; - SyntaxKind[SyntaxKind["HeritageClause"] = 229] = "HeritageClause"; - SyntaxKind[SyntaxKind["EqualsValueClause"] = 230] = "EqualsValueClause"; - SyntaxKind[SyntaxKind["CaseSwitchClause"] = 231] = "CaseSwitchClause"; - SyntaxKind[SyntaxKind["DefaultSwitchClause"] = 232] = "DefaultSwitchClause"; - SyntaxKind[SyntaxKind["ElseClause"] = 233] = "ElseClause"; - SyntaxKind[SyntaxKind["CatchClause"] = 234] = "CatchClause"; - SyntaxKind[SyntaxKind["FinallyClause"] = 235] = "FinallyClause"; + SyntaxKind[SyntaxKind["HeritageClause"] = 230] = "HeritageClause"; + SyntaxKind[SyntaxKind["EqualsValueClause"] = 231] = "EqualsValueClause"; + SyntaxKind[SyntaxKind["CaseSwitchClause"] = 232] = "CaseSwitchClause"; + SyntaxKind[SyntaxKind["DefaultSwitchClause"] = 233] = "DefaultSwitchClause"; + SyntaxKind[SyntaxKind["ElseClause"] = 234] = "ElseClause"; + SyntaxKind[SyntaxKind["CatchClause"] = 235] = "CatchClause"; + SyntaxKind[SyntaxKind["FinallyClause"] = 236] = "FinallyClause"; - SyntaxKind[SyntaxKind["TypeParameter"] = 236] = "TypeParameter"; - SyntaxKind[SyntaxKind["Constraint"] = 237] = "Constraint"; + SyntaxKind[SyntaxKind["TypeParameter"] = 237] = "TypeParameter"; + SyntaxKind[SyntaxKind["Constraint"] = 238] = "Constraint"; - SyntaxKind[SyntaxKind["SimplePropertyAssignment"] = 238] = "SimplePropertyAssignment"; - SyntaxKind[SyntaxKind["GetAccessorPropertyAssignment"] = 239] = "GetAccessorPropertyAssignment"; - SyntaxKind[SyntaxKind["SetAccessorPropertyAssignment"] = 240] = "SetAccessorPropertyAssignment"; - SyntaxKind[SyntaxKind["FunctionPropertyAssignment"] = 241] = "FunctionPropertyAssignment"; + SyntaxKind[SyntaxKind["SimplePropertyAssignment"] = 239] = "SimplePropertyAssignment"; + SyntaxKind[SyntaxKind["GetAccessorPropertyAssignment"] = 240] = "GetAccessorPropertyAssignment"; + SyntaxKind[SyntaxKind["SetAccessorPropertyAssignment"] = 241] = "SetAccessorPropertyAssignment"; + SyntaxKind[SyntaxKind["FunctionPropertyAssignment"] = 242] = "FunctionPropertyAssignment"; - SyntaxKind[SyntaxKind["Parameter"] = 242] = "Parameter"; - SyntaxKind[SyntaxKind["EnumElement"] = 243] = "EnumElement"; - SyntaxKind[SyntaxKind["TypeAnnotation"] = 244] = "TypeAnnotation"; - SyntaxKind[SyntaxKind["ExternalModuleReference"] = 245] = "ExternalModuleReference"; - SyntaxKind[SyntaxKind["ModuleNameModuleReference"] = 246] = "ModuleNameModuleReference"; + SyntaxKind[SyntaxKind["Parameter"] = 243] = "Parameter"; + SyntaxKind[SyntaxKind["EnumElement"] = 244] = "EnumElement"; + SyntaxKind[SyntaxKind["TypeAnnotation"] = 245] = "TypeAnnotation"; + SyntaxKind[SyntaxKind["ExternalModuleReference"] = 246] = "ExternalModuleReference"; + SyntaxKind[SyntaxKind["ModuleNameModuleReference"] = 247] = "ModuleNameModuleReference"; SyntaxKind[SyntaxKind["FirstStandardKeyword"] = SyntaxKind.BreakKeyword] = "FirstStandardKeyword"; SyntaxKind[SyntaxKind["LastStandardKeyword"] = SyntaxKind.WithKeyword] = "LastStandardKeyword"; @@ -4989,6 +5054,7 @@ var TypeScript; (function (SyntaxFacts) { var textToKeywordKind = { "any": 60 /* AnyKeyword */, + "bool": 62 /* BoolKeyword */, "boolean": 61 /* BooleanKeyword */, "break": 15 /* BreakKeyword */, "case": 16 /* CaseKeyword */, @@ -4996,9 +5062,9 @@ var TypeScript; "class": 44 /* ClassKeyword */, "continue": 18 /* ContinueKeyword */, "const": 45 /* ConstKeyword */, - "constructor": 62 /* ConstructorKeyword */, + "constructor": 63 /* ConstructorKeyword */, "debugger": 19 /* DebuggerKeyword */, - "declare": 63 /* DeclareKeyword */, + "declare": 64 /* DeclareKeyword */, "default": 20 /* DefaultKeyword */, "delete": 21 /* DeleteKeyword */, "do": 22 /* DoKeyword */, @@ -5010,7 +5076,7 @@ var TypeScript; "finally": 25 /* FinallyKeyword */, "for": 26 /* ForKeyword */, "function": 27 /* FunctionKeyword */, - "get": 64 /* GetKeyword */, + "get": 65 /* GetKeyword */, "if": 28 /* IfKeyword */, "implements": 51 /* ImplementsKeyword */, "import": 49 /* ImportKeyword */, @@ -5018,19 +5084,19 @@ var TypeScript; "instanceof": 30 /* InstanceOfKeyword */, "interface": 52 /* InterfaceKeyword */, "let": 53 /* LetKeyword */, - "module": 65 /* ModuleKeyword */, + "module": 66 /* ModuleKeyword */, "new": 31 /* NewKeyword */, "null": 32 /* NullKeyword */, - "number": 67 /* NumberKeyword */, + "number": 68 /* NumberKeyword */, "package": 54 /* PackageKeyword */, "private": 55 /* PrivateKeyword */, "protected": 56 /* ProtectedKeyword */, "public": 57 /* PublicKeyword */, - "require": 66 /* RequireKeyword */, + "require": 67 /* RequireKeyword */, "return": 33 /* ReturnKeyword */, - "set": 68 /* SetKeyword */, + "set": 69 /* SetKeyword */, "static": 58 /* StaticKeyword */, - "string": 69 /* StringKeyword */, + "string": 70 /* StringKeyword */, "super": 50 /* SuperKeyword */, "switch": 34 /* SwitchKeyword */, "this": 35 /* ThisKeyword */, @@ -5043,56 +5109,56 @@ var TypeScript; "while": 42 /* WhileKeyword */, "with": 43 /* WithKeyword */, "yield": 59 /* YieldKeyword */, - "{": 70 /* OpenBraceToken */, - "}": 71 /* CloseBraceToken */, - "(": 72 /* OpenParenToken */, - ")": 73 /* CloseParenToken */, - "[": 74 /* OpenBracketToken */, - "]": 75 /* CloseBracketToken */, - ".": 76 /* DotToken */, - "...": 77 /* DotDotDotToken */, - ";": 78 /* SemicolonToken */, - ",": 79 /* CommaToken */, - "<": 80 /* LessThanToken */, - ">": 81 /* GreaterThanToken */, - "<=": 82 /* LessThanEqualsToken */, - ">=": 83 /* GreaterThanEqualsToken */, - "==": 84 /* EqualsEqualsToken */, - "=>": 85 /* EqualsGreaterThanToken */, - "!=": 86 /* ExclamationEqualsToken */, - "===": 87 /* EqualsEqualsEqualsToken */, - "!==": 88 /* ExclamationEqualsEqualsToken */, - "+": 89 /* PlusToken */, - "-": 90 /* MinusToken */, - "*": 91 /* AsteriskToken */, - "%": 92 /* PercentToken */, - "++": 93 /* PlusPlusToken */, - "--": 94 /* MinusMinusToken */, - "<<": 95 /* LessThanLessThanToken */, - ">>": 96 /* GreaterThanGreaterThanToken */, - ">>>": 97 /* GreaterThanGreaterThanGreaterThanToken */, - "&": 98 /* AmpersandToken */, - "|": 99 /* BarToken */, - "^": 100 /* CaretToken */, - "!": 101 /* ExclamationToken */, - "~": 102 /* TildeToken */, - "&&": 103 /* AmpersandAmpersandToken */, - "||": 104 /* BarBarToken */, - "?": 105 /* QuestionToken */, - ":": 106 /* ColonToken */, - "=": 107 /* EqualsToken */, - "+=": 108 /* PlusEqualsToken */, - "-=": 109 /* MinusEqualsToken */, - "*=": 110 /* AsteriskEqualsToken */, - "%=": 111 /* PercentEqualsToken */, - "<<=": 112 /* LessThanLessThanEqualsToken */, - ">>=": 113 /* GreaterThanGreaterThanEqualsToken */, - ">>>=": 114 /* GreaterThanGreaterThanGreaterThanEqualsToken */, - "&=": 115 /* AmpersandEqualsToken */, - "|=": 116 /* BarEqualsToken */, - "^=": 117 /* CaretEqualsToken */, - "/": 118 /* SlashToken */, - "/=": 119 /* SlashEqualsToken */ + "{": 71 /* OpenBraceToken */, + "}": 72 /* CloseBraceToken */, + "(": 73 /* OpenParenToken */, + ")": 74 /* CloseParenToken */, + "[": 75 /* OpenBracketToken */, + "]": 76 /* CloseBracketToken */, + ".": 77 /* DotToken */, + "...": 78 /* DotDotDotToken */, + ";": 79 /* SemicolonToken */, + ",": 80 /* CommaToken */, + "<": 81 /* LessThanToken */, + ">": 82 /* GreaterThanToken */, + "<=": 83 /* LessThanEqualsToken */, + ">=": 84 /* GreaterThanEqualsToken */, + "==": 85 /* EqualsEqualsToken */, + "=>": 86 /* EqualsGreaterThanToken */, + "!=": 87 /* ExclamationEqualsToken */, + "===": 88 /* EqualsEqualsEqualsToken */, + "!==": 89 /* ExclamationEqualsEqualsToken */, + "+": 90 /* PlusToken */, + "-": 91 /* MinusToken */, + "*": 92 /* AsteriskToken */, + "%": 93 /* PercentToken */, + "++": 94 /* PlusPlusToken */, + "--": 95 /* MinusMinusToken */, + "<<": 96 /* LessThanLessThanToken */, + ">>": 97 /* GreaterThanGreaterThanToken */, + ">>>": 98 /* GreaterThanGreaterThanGreaterThanToken */, + "&": 99 /* AmpersandToken */, + "|": 100 /* BarToken */, + "^": 101 /* CaretToken */, + "!": 102 /* ExclamationToken */, + "~": 103 /* TildeToken */, + "&&": 104 /* AmpersandAmpersandToken */, + "||": 105 /* BarBarToken */, + "?": 106 /* QuestionToken */, + ":": 107 /* ColonToken */, + "=": 108 /* EqualsToken */, + "+=": 109 /* PlusEqualsToken */, + "-=": 110 /* MinusEqualsToken */, + "*=": 111 /* AsteriskEqualsToken */, + "%=": 112 /* PercentEqualsToken */, + "<<=": 113 /* LessThanLessThanEqualsToken */, + ">>=": 114 /* GreaterThanGreaterThanEqualsToken */, + ">>>=": 115 /* GreaterThanGreaterThanGreaterThanEqualsToken */, + "&=": 116 /* AmpersandEqualsToken */, + "|=": 117 /* BarEqualsToken */, + "^=": 118 /* CaretEqualsToken */, + "/": 119 /* SlashToken */, + "/=": 120 /* SlashEqualsToken */ }; var kindToText = new Array(); @@ -5103,7 +5169,7 @@ var TypeScript; } } - kindToText[62 /* ConstructorKeyword */] = "constructor"; + kindToText[63 /* ConstructorKeyword */] = "constructor"; function getTokenKind(text) { if (textToKeywordKind.hasOwnProperty(text)) { @@ -5121,12 +5187,12 @@ var TypeScript; SyntaxFacts.getText = getText; function isTokenKind(kind) { - return kind >= 9 /* FirstToken */ && kind <= 119 /* LastToken */; + return kind >= 9 /* FirstToken */ && kind <= 120 /* LastToken */; } SyntaxFacts.isTokenKind = isTokenKind; function isAnyKeyword(kind) { - return kind >= 15 /* FirstKeyword */ && kind <= 69 /* LastKeyword */; + return kind >= 15 /* FirstKeyword */ && kind <= 70 /* LastKeyword */; } SyntaxFacts.isAnyKeyword = isAnyKeyword; @@ -5146,7 +5212,7 @@ var TypeScript; SyntaxFacts.isFutureReservedStrictKeyword = isFutureReservedStrictKeyword; function isAnyPunctuation(kind) { - return kind >= 70 /* FirstPunctuation */ && kind <= 119 /* LastPunctuation */; + return kind >= 71 /* FirstPunctuation */ && kind <= 120 /* LastPunctuation */; } SyntaxFacts.isAnyPunctuation = isAnyPunctuation; @@ -5162,18 +5228,18 @@ var TypeScript; function getPrefixUnaryExpressionFromOperatorToken(tokenKind) { switch (tokenKind) { - case 89 /* PlusToken */: - return 163 /* PlusExpression */; - case 90 /* MinusToken */: - return 164 /* NegateExpression */; - case 102 /* TildeToken */: - return 165 /* BitwiseNotExpression */; - case 101 /* ExclamationToken */: - return 166 /* LogicalNotExpression */; - case 93 /* PlusPlusToken */: - return 167 /* PreIncrementExpression */; - case 94 /* MinusMinusToken */: - return 168 /* PreDecrementExpression */; + case 90 /* PlusToken */: + return 164 /* PlusExpression */; + case 91 /* MinusToken */: + return 165 /* NegateExpression */; + case 103 /* TildeToken */: + return 166 /* BitwiseNotExpression */; + case 102 /* ExclamationToken */: + return 167 /* LogicalNotExpression */; + case 94 /* PlusPlusToken */: + return 168 /* PreIncrementExpression */; + case 95 /* MinusMinusToken */: + return 169 /* PreDecrementExpression */; default: return 0 /* None */; @@ -5183,10 +5249,10 @@ var TypeScript; function getPostfixUnaryExpressionFromOperatorToken(tokenKind) { switch (tokenKind) { - case 93 /* PlusPlusToken */: - return 209 /* PostIncrementExpression */; - case 94 /* MinusMinusToken */: - return 210 /* PostDecrementExpression */; + case 94 /* PlusPlusToken */: + return 210 /* PostIncrementExpression */; + case 95 /* MinusMinusToken */: + return 211 /* PostDecrementExpression */; default: return 0 /* None */; } @@ -5195,113 +5261,113 @@ var TypeScript; function getBinaryExpressionFromOperatorToken(tokenKind) { switch (tokenKind) { - case 91 /* AsteriskToken */: - return 204 /* MultiplyExpression */; + case 92 /* AsteriskToken */: + return 205 /* MultiplyExpression */; - case 118 /* SlashToken */: - return 205 /* DivideExpression */; + case 119 /* SlashToken */: + return 206 /* DivideExpression */; - case 92 /* PercentToken */: - return 206 /* ModuloExpression */; + case 93 /* PercentToken */: + return 207 /* ModuloExpression */; - case 89 /* PlusToken */: - return 207 /* AddExpression */; + case 90 /* PlusToken */: + return 208 /* AddExpression */; - case 90 /* MinusToken */: - return 208 /* SubtractExpression */; + case 91 /* MinusToken */: + return 209 /* SubtractExpression */; - case 95 /* LessThanLessThanToken */: - return 201 /* LeftShiftExpression */; + case 96 /* LessThanLessThanToken */: + return 202 /* LeftShiftExpression */; - case 96 /* GreaterThanGreaterThanToken */: - return 202 /* SignedRightShiftExpression */; + case 97 /* GreaterThanGreaterThanToken */: + return 203 /* SignedRightShiftExpression */; - case 97 /* GreaterThanGreaterThanGreaterThanToken */: - return 203 /* UnsignedRightShiftExpression */; + case 98 /* GreaterThanGreaterThanGreaterThanToken */: + return 204 /* UnsignedRightShiftExpression */; - case 80 /* LessThanToken */: - return 195 /* LessThanExpression */; + case 81 /* LessThanToken */: + return 196 /* LessThanExpression */; - case 81 /* GreaterThanToken */: - return 196 /* GreaterThanExpression */; + case 82 /* GreaterThanToken */: + return 197 /* GreaterThanExpression */; - case 82 /* LessThanEqualsToken */: - return 197 /* LessThanOrEqualExpression */; + case 83 /* LessThanEqualsToken */: + return 198 /* LessThanOrEqualExpression */; - case 83 /* GreaterThanEqualsToken */: - return 198 /* GreaterThanOrEqualExpression */; + case 84 /* GreaterThanEqualsToken */: + return 199 /* GreaterThanOrEqualExpression */; case 30 /* InstanceOfKeyword */: - return 199 /* InstanceOfExpression */; + return 200 /* InstanceOfExpression */; case 29 /* InKeyword */: - return 200 /* InExpression */; + return 201 /* InExpression */; - case 84 /* EqualsEqualsToken */: - return 191 /* EqualsWithTypeConversionExpression */; + case 85 /* EqualsEqualsToken */: + return 192 /* EqualsWithTypeConversionExpression */; - case 86 /* ExclamationEqualsToken */: - return 192 /* NotEqualsWithTypeConversionExpression */; + case 87 /* ExclamationEqualsToken */: + return 193 /* NotEqualsWithTypeConversionExpression */; - case 87 /* EqualsEqualsEqualsToken */: - return 193 /* EqualsExpression */; + case 88 /* EqualsEqualsEqualsToken */: + return 194 /* EqualsExpression */; - case 88 /* ExclamationEqualsEqualsToken */: - return 194 /* NotEqualsExpression */; + case 89 /* ExclamationEqualsEqualsToken */: + return 195 /* NotEqualsExpression */; - case 98 /* AmpersandToken */: - return 190 /* BitwiseAndExpression */; + case 99 /* AmpersandToken */: + return 191 /* BitwiseAndExpression */; - case 100 /* CaretToken */: - return 189 /* BitwiseExclusiveOrExpression */; + case 101 /* CaretToken */: + return 190 /* BitwiseExclusiveOrExpression */; - case 99 /* BarToken */: - return 188 /* BitwiseOrExpression */; + case 100 /* BarToken */: + return 189 /* BitwiseOrExpression */; - case 103 /* AmpersandAmpersandToken */: - return 187 /* LogicalAndExpression */; + case 104 /* AmpersandAmpersandToken */: + return 188 /* LogicalAndExpression */; - case 104 /* BarBarToken */: - return 186 /* LogicalOrExpression */; + case 105 /* BarBarToken */: + return 187 /* LogicalOrExpression */; - case 116 /* BarEqualsToken */: - return 181 /* OrAssignmentExpression */; + case 117 /* BarEqualsToken */: + return 182 /* OrAssignmentExpression */; - case 115 /* AmpersandEqualsToken */: - return 179 /* AndAssignmentExpression */; + case 116 /* AmpersandEqualsToken */: + return 180 /* AndAssignmentExpression */; - case 117 /* CaretEqualsToken */: - return 180 /* ExclusiveOrAssignmentExpression */; + case 118 /* CaretEqualsToken */: + return 181 /* ExclusiveOrAssignmentExpression */; - case 112 /* LessThanLessThanEqualsToken */: - return 182 /* LeftShiftAssignmentExpression */; + case 113 /* LessThanLessThanEqualsToken */: + return 183 /* LeftShiftAssignmentExpression */; - case 113 /* GreaterThanGreaterThanEqualsToken */: - return 183 /* SignedRightShiftAssignmentExpression */; + case 114 /* GreaterThanGreaterThanEqualsToken */: + return 184 /* SignedRightShiftAssignmentExpression */; - case 114 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - return 184 /* UnsignedRightShiftAssignmentExpression */; + case 115 /* GreaterThanGreaterThanGreaterThanEqualsToken */: + return 185 /* UnsignedRightShiftAssignmentExpression */; - case 108 /* PlusEqualsToken */: - return 174 /* AddAssignmentExpression */; + case 109 /* PlusEqualsToken */: + return 175 /* AddAssignmentExpression */; - case 109 /* MinusEqualsToken */: - return 175 /* SubtractAssignmentExpression */; + case 110 /* MinusEqualsToken */: + return 176 /* SubtractAssignmentExpression */; - case 110 /* AsteriskEqualsToken */: - return 176 /* MultiplyAssignmentExpression */; + case 111 /* AsteriskEqualsToken */: + return 177 /* MultiplyAssignmentExpression */; - case 119 /* SlashEqualsToken */: - return 177 /* DivideAssignmentExpression */; + case 120 /* SlashEqualsToken */: + return 178 /* DivideAssignmentExpression */; - case 111 /* PercentEqualsToken */: - return 178 /* ModuloAssignmentExpression */; + case 112 /* PercentEqualsToken */: + return 179 /* ModuloAssignmentExpression */; - case 107 /* EqualsToken */: - return 173 /* AssignmentExpression */; + case 108 /* EqualsToken */: + return 174 /* AssignmentExpression */; - case 79 /* CommaToken */: - return 172 /* CommaExpression */; + case 80 /* CommaToken */: + return 173 /* CommaExpression */; default: return 0 /* None */; @@ -5311,8 +5377,8 @@ var TypeScript; function isAnyDivideToken(kind) { switch (kind) { - case 118 /* SlashToken */: - case 119 /* SlashEqualsToken */: + case 119 /* SlashToken */: + case 120 /* SlashEqualsToken */: return true; default: return false; @@ -5322,8 +5388,8 @@ var TypeScript; function isAnyDivideOrRegularExpressionToken(kind) { switch (kind) { - case 118 /* SlashToken */: - case 119 /* SlashEqualsToken */: + case 119 /* SlashToken */: + case 120 /* SlashEqualsToken */: case 12 /* RegularExpressionLiteral */: return true; default: @@ -5334,11 +5400,11 @@ var TypeScript; function isParserGenerated(kind) { switch (kind) { - case 96 /* GreaterThanGreaterThanToken */: - case 97 /* GreaterThanGreaterThanGreaterThanToken */: - case 83 /* GreaterThanEqualsToken */: - case 113 /* GreaterThanGreaterThanEqualsToken */: - case 114 /* GreaterThanGreaterThanGreaterThanEqualsToken */: + case 97 /* GreaterThanGreaterThanToken */: + case 98 /* GreaterThanGreaterThanGreaterThanToken */: + case 84 /* GreaterThanEqualsToken */: + case 114 /* GreaterThanGreaterThanEqualsToken */: + case 115 /* GreaterThanGreaterThanGreaterThanEqualsToken */: return true; default: return false; @@ -5348,42 +5414,42 @@ var TypeScript; function isAnyBinaryExpression(kind) { switch (kind) { - case 172 /* CommaExpression */: - case 173 /* AssignmentExpression */: - case 174 /* AddAssignmentExpression */: - case 175 /* SubtractAssignmentExpression */: - case 176 /* MultiplyAssignmentExpression */: - case 177 /* DivideAssignmentExpression */: - case 178 /* ModuloAssignmentExpression */: - case 179 /* AndAssignmentExpression */: - case 180 /* ExclusiveOrAssignmentExpression */: - case 181 /* OrAssignmentExpression */: - case 182 /* LeftShiftAssignmentExpression */: - case 183 /* SignedRightShiftAssignmentExpression */: - case 184 /* UnsignedRightShiftAssignmentExpression */: - case 186 /* LogicalOrExpression */: - case 187 /* LogicalAndExpression */: - case 188 /* BitwiseOrExpression */: - case 189 /* BitwiseExclusiveOrExpression */: - case 190 /* BitwiseAndExpression */: - case 191 /* EqualsWithTypeConversionExpression */: - case 192 /* NotEqualsWithTypeConversionExpression */: - case 193 /* EqualsExpression */: - case 194 /* NotEqualsExpression */: - case 195 /* LessThanExpression */: - case 196 /* GreaterThanExpression */: - case 197 /* LessThanOrEqualExpression */: - case 198 /* GreaterThanOrEqualExpression */: - case 199 /* InstanceOfExpression */: - case 200 /* InExpression */: - case 201 /* LeftShiftExpression */: - case 202 /* SignedRightShiftExpression */: - case 203 /* UnsignedRightShiftExpression */: - case 204 /* MultiplyExpression */: - case 205 /* DivideExpression */: - case 206 /* ModuloExpression */: - case 207 /* AddExpression */: - case 208 /* SubtractExpression */: + case 173 /* CommaExpression */: + case 174 /* AssignmentExpression */: + case 175 /* AddAssignmentExpression */: + case 176 /* SubtractAssignmentExpression */: + case 177 /* MultiplyAssignmentExpression */: + case 178 /* DivideAssignmentExpression */: + case 179 /* ModuloAssignmentExpression */: + case 180 /* AndAssignmentExpression */: + case 181 /* ExclusiveOrAssignmentExpression */: + case 182 /* OrAssignmentExpression */: + case 183 /* LeftShiftAssignmentExpression */: + case 184 /* SignedRightShiftAssignmentExpression */: + case 185 /* UnsignedRightShiftAssignmentExpression */: + case 187 /* LogicalOrExpression */: + case 188 /* LogicalAndExpression */: + case 189 /* BitwiseOrExpression */: + case 190 /* BitwiseExclusiveOrExpression */: + case 191 /* BitwiseAndExpression */: + case 192 /* EqualsWithTypeConversionExpression */: + case 193 /* NotEqualsWithTypeConversionExpression */: + case 194 /* EqualsExpression */: + case 195 /* NotEqualsExpression */: + case 196 /* LessThanExpression */: + case 197 /* GreaterThanExpression */: + case 198 /* LessThanOrEqualExpression */: + case 199 /* GreaterThanOrEqualExpression */: + case 200 /* InstanceOfExpression */: + case 201 /* InExpression */: + case 202 /* LeftShiftExpression */: + case 203 /* SignedRightShiftExpression */: + case 204 /* UnsignedRightShiftExpression */: + case 205 /* MultiplyExpression */: + case 206 /* DivideExpression */: + case 207 /* ModuloExpression */: + case 208 /* AddExpression */: + case 209 /* SubtractExpression */: return true; } @@ -5415,7 +5481,7 @@ var TypeScript; isNumericLiteralStart[46 /* dot */] = true; - for (var keywordKind = 15 /* FirstKeyword */; keywordKind <= 69 /* LastKeyword */; keywordKind++) { + for (var keywordKind = 15 /* FirstKeyword */; keywordKind <= 70 /* LastKeyword */; keywordKind++) { var keyword = TypeScript.SyntaxFacts.getText(keywordKind); isKeywordStartCharacter[keyword.charCodeAt(0)] = true; } @@ -5822,40 +5888,40 @@ var TypeScript; return this.scanLessThanToken(); case 62 /* greaterThan */: - return this.advanceAndSetTokenKind(81 /* GreaterThanToken */); + return this.advanceAndSetTokenKind(82 /* GreaterThanToken */); case 44 /* comma */: - return this.advanceAndSetTokenKind(79 /* CommaToken */); + return this.advanceAndSetTokenKind(80 /* CommaToken */); case 58 /* colon */: - return this.advanceAndSetTokenKind(106 /* ColonToken */); + return this.advanceAndSetTokenKind(107 /* ColonToken */); case 59 /* semicolon */: - return this.advanceAndSetTokenKind(78 /* SemicolonToken */); + return this.advanceAndSetTokenKind(79 /* SemicolonToken */); case 126 /* tilde */: - return this.advanceAndSetTokenKind(102 /* TildeToken */); + return this.advanceAndSetTokenKind(103 /* TildeToken */); case 40 /* openParen */: - return this.advanceAndSetTokenKind(72 /* OpenParenToken */); + return this.advanceAndSetTokenKind(73 /* OpenParenToken */); case 41 /* closeParen */: - return this.advanceAndSetTokenKind(73 /* CloseParenToken */); + return this.advanceAndSetTokenKind(74 /* CloseParenToken */); case 123 /* openBrace */: - return this.advanceAndSetTokenKind(70 /* OpenBraceToken */); + return this.advanceAndSetTokenKind(71 /* OpenBraceToken */); case 125 /* closeBrace */: - return this.advanceAndSetTokenKind(71 /* CloseBraceToken */); + return this.advanceAndSetTokenKind(72 /* CloseBraceToken */); case 91 /* openBracket */: - return this.advanceAndSetTokenKind(74 /* OpenBracketToken */); + return this.advanceAndSetTokenKind(75 /* OpenBracketToken */); case 93 /* closeBracket */: - return this.advanceAndSetTokenKind(75 /* CloseBracketToken */); + return this.advanceAndSetTokenKind(76 /* CloseBracketToken */); case 63 /* question */: - return this.advanceAndSetTokenKind(105 /* QuestionToken */); + return this.advanceAndSetTokenKind(106 /* QuestionToken */); } if (isNumericLiteralStart[character]) { @@ -6004,17 +6070,17 @@ var TypeScript; this.slidingWindow.moveToNextItem(); if (this.currentCharCode() === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 82 /* LessThanEqualsToken */; + return 83 /* LessThanEqualsToken */; } else if (this.currentCharCode() === 60 /* lessThan */) { this.slidingWindow.moveToNextItem(); if (this.currentCharCode() === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 112 /* LessThanLessThanEqualsToken */; + return 113 /* LessThanLessThanEqualsToken */; } else { - return 95 /* LessThanLessThanToken */; + return 96 /* LessThanLessThanToken */; } } else { - return 80 /* LessThanToken */; + return 81 /* LessThanToken */; } }; @@ -6022,12 +6088,12 @@ var TypeScript; this.slidingWindow.moveToNextItem(); if (this.currentCharCode() === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 116 /* BarEqualsToken */; + return 117 /* BarEqualsToken */; } else if (this.currentCharCode() === 124 /* bar */) { this.slidingWindow.moveToNextItem(); - return 104 /* BarBarToken */; + return 105 /* BarBarToken */; } else { - return 99 /* BarToken */; + return 100 /* BarToken */; } }; @@ -6035,9 +6101,9 @@ var TypeScript; this.slidingWindow.moveToNextItem(); if (this.currentCharCode() === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 117 /* CaretEqualsToken */; + return 118 /* CaretEqualsToken */; } else { - return 100 /* CaretToken */; + return 101 /* CaretToken */; } }; @@ -6046,12 +6112,12 @@ var TypeScript; var character = this.currentCharCode(); if (character === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 115 /* AmpersandEqualsToken */; + return 116 /* AmpersandEqualsToken */; } else if (this.currentCharCode() === 38 /* ampersand */) { this.slidingWindow.moveToNextItem(); - return 103 /* AmpersandAmpersandToken */; + return 104 /* AmpersandAmpersandToken */; } else { - return 98 /* AmpersandToken */; + return 99 /* AmpersandToken */; } }; @@ -6059,9 +6125,9 @@ var TypeScript; this.slidingWindow.moveToNextItem(); if (this.currentCharCode() === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 111 /* PercentEqualsToken */; + return 112 /* PercentEqualsToken */; } else { - return 92 /* PercentToken */; + return 93 /* PercentToken */; } }; @@ -6071,12 +6137,12 @@ var TypeScript; if (character === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 109 /* MinusEqualsToken */; + return 110 /* MinusEqualsToken */; } else if (character === 45 /* minus */) { this.slidingWindow.moveToNextItem(); - return 94 /* MinusMinusToken */; + return 95 /* MinusMinusToken */; } else { - return 90 /* MinusToken */; + return 91 /* MinusToken */; } }; @@ -6085,12 +6151,12 @@ var TypeScript; var character = this.currentCharCode(); if (character === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 108 /* PlusEqualsToken */; + return 109 /* PlusEqualsToken */; } else if (character === 43 /* plus */) { this.slidingWindow.moveToNextItem(); - return 93 /* PlusPlusToken */; + return 94 /* PlusPlusToken */; } else { - return 89 /* PlusToken */; + return 90 /* PlusToken */; } }; @@ -6098,9 +6164,9 @@ var TypeScript; this.slidingWindow.moveToNextItem(); if (this.currentCharCode() === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 110 /* AsteriskEqualsToken */; + return 111 /* AsteriskEqualsToken */; } else { - return 91 /* AsteriskToken */; + return 92 /* AsteriskToken */; } }; @@ -6113,15 +6179,15 @@ var TypeScript; if (this.currentCharCode() === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 87 /* EqualsEqualsEqualsToken */; + return 88 /* EqualsEqualsEqualsToken */; } else { - return 84 /* EqualsEqualsToken */; + return 85 /* EqualsEqualsToken */; } } else if (character === 62 /* greaterThan */) { this.slidingWindow.moveToNextItem(); - return 85 /* EqualsGreaterThanToken */; + return 86 /* EqualsGreaterThanToken */; } else { - return 107 /* EqualsToken */; + return 108 /* EqualsToken */; } }; @@ -6143,9 +6209,9 @@ var TypeScript; if (this.currentCharCode() === 46 /* dot */ && this.slidingWindow.peekItemN(1) === 46 /* dot */) { this.slidingWindow.moveToNextItem(); this.slidingWindow.moveToNextItem(); - return 77 /* DotDotDotToken */; + return 78 /* DotDotDotToken */; } else { - return 76 /* DotToken */; + return 77 /* DotToken */; } }; @@ -6160,9 +6226,9 @@ var TypeScript; this.slidingWindow.moveToNextItem(); if (this.currentCharCode() === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 119 /* SlashEqualsToken */; + return 120 /* SlashEqualsToken */; } else { - return 118 /* SlashToken */; + return 119 /* SlashToken */; } }; @@ -6231,12 +6297,12 @@ var TypeScript; if (this.currentCharCode() === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 88 /* ExclamationEqualsEqualsToken */; + return 89 /* ExclamationEqualsEqualsToken */; } else { - return 86 /* ExclamationEqualsToken */; + return 87 /* ExclamationEqualsToken */; } } else { - return 101 /* ExclamationToken */; + return 102 /* ExclamationToken */; } }; @@ -6490,9 +6556,9 @@ var TypeScript; case 97 /* a */: return (array[startIndex + 1] === 110 /* n */ && array[startIndex + 2] === 121 /* y */) ? 60 /* AnyKeyword */ : 11 /* IdentifierName */; case 103 /* g */: - return (array[startIndex + 1] === 101 /* e */ && array[startIndex + 2] === 116 /* t */) ? 64 /* GetKeyword */ : 11 /* IdentifierName */; + return (array[startIndex + 1] === 101 /* e */ && array[startIndex + 2] === 116 /* t */) ? 65 /* GetKeyword */ : 11 /* IdentifierName */; case 115 /* s */: - return (array[startIndex + 1] === 101 /* e */ && array[startIndex + 2] === 116 /* t */) ? 68 /* SetKeyword */ : 11 /* IdentifierName */; + return (array[startIndex + 1] === 101 /* e */ && array[startIndex + 2] === 116 /* t */) ? 69 /* SetKeyword */ : 11 /* IdentifierName */; default: return 11 /* IdentifierName */; } @@ -6527,6 +6593,8 @@ var TypeScript; return (array[startIndex + 1] === 111 /* o */ && array[startIndex + 2] === 105 /* i */ && array[startIndex + 3] === 100 /* d */) ? 41 /* VoidKeyword */ : 11 /* IdentifierName */; case 119 /* w */: return (array[startIndex + 1] === 105 /* i */ && array[startIndex + 2] === 116 /* t */ && array[startIndex + 3] === 104 /* h */) ? 43 /* WithKeyword */ : 11 /* IdentifierName */; + case 98 /* b */: + return (array[startIndex + 1] === 111 /* o */ && array[startIndex + 2] === 111 /* o */ && array[startIndex + 3] === 108 /* l */) ? 62 /* BoolKeyword */ : 11 /* IdentifierName */; default: return 11 /* IdentifierName */; } @@ -6576,7 +6644,7 @@ var TypeScript; case 97 /* a */: return (array[startIndex + 3] === 116 /* t */ && array[startIndex + 4] === 105 /* i */ && array[startIndex + 5] === 99 /* c */) ? 58 /* StaticKeyword */ : 11 /* IdentifierName */; case 114 /* r */: - return (array[startIndex + 3] === 105 /* i */ && array[startIndex + 4] === 110 /* n */ && array[startIndex + 5] === 103 /* g */) ? 69 /* StringKeyword */ : 11 /* IdentifierName */; + return (array[startIndex + 3] === 105 /* i */ && array[startIndex + 4] === 110 /* n */ && array[startIndex + 5] === 103 /* g */) ? 70 /* StringKeyword */ : 11 /* IdentifierName */; default: return 11 /* IdentifierName */; } @@ -6594,9 +6662,9 @@ var TypeScript; case 112 /* p */: return (array[startIndex + 1] === 117 /* u */ && array[startIndex + 2] === 98 /* b */ && array[startIndex + 3] === 108 /* l */ && array[startIndex + 4] === 105 /* i */ && array[startIndex + 5] === 99 /* c */) ? 57 /* PublicKeyword */ : 11 /* IdentifierName */; case 109 /* m */: - return (array[startIndex + 1] === 111 /* o */ && array[startIndex + 2] === 100 /* d */ && array[startIndex + 3] === 117 /* u */ && array[startIndex + 4] === 108 /* l */ && array[startIndex + 5] === 101 /* e */) ? 65 /* ModuleKeyword */ : 11 /* IdentifierName */; + return (array[startIndex + 1] === 111 /* o */ && array[startIndex + 2] === 100 /* d */ && array[startIndex + 3] === 117 /* u */ && array[startIndex + 4] === 108 /* l */ && array[startIndex + 5] === 101 /* e */) ? 66 /* ModuleKeyword */ : 11 /* IdentifierName */; case 110 /* n */: - return (array[startIndex + 1] === 117 /* u */ && array[startIndex + 2] === 109 /* m */ && array[startIndex + 3] === 98 /* b */ && array[startIndex + 4] === 101 /* e */ && array[startIndex + 5] === 114 /* r */) ? 67 /* NumberKeyword */ : 11 /* IdentifierName */; + return (array[startIndex + 1] === 117 /* u */ && array[startIndex + 2] === 109 /* m */ && array[startIndex + 3] === 98 /* b */ && array[startIndex + 4] === 101 /* e */ && array[startIndex + 5] === 114 /* r */) ? 68 /* NumberKeyword */ : 11 /* IdentifierName */; default: return 11 /* IdentifierName */; } @@ -6610,7 +6678,7 @@ var TypeScript; case 102 /* f */: return (array[startIndex + 3] === 97 /* a */ && array[startIndex + 4] === 117 /* u */ && array[startIndex + 5] === 108 /* l */ && array[startIndex + 6] === 116 /* t */) ? 20 /* DefaultKeyword */ : 11 /* IdentifierName */; case 99 /* c */: - return (array[startIndex + 3] === 108 /* l */ && array[startIndex + 4] === 97 /* a */ && array[startIndex + 5] === 114 /* r */ && array[startIndex + 6] === 101 /* e */) ? 63 /* DeclareKeyword */ : 11 /* IdentifierName */; + return (array[startIndex + 3] === 108 /* l */ && array[startIndex + 4] === 97 /* a */ && array[startIndex + 5] === 114 /* r */ && array[startIndex + 6] === 101 /* e */) ? 64 /* DeclareKeyword */ : 11 /* IdentifierName */; default: return 11 /* IdentifierName */; } @@ -6636,7 +6704,7 @@ var TypeScript; case 98 /* b */: return (array[startIndex + 1] === 111 /* o */ && array[startIndex + 2] === 111 /* o */ && array[startIndex + 3] === 108 /* l */ && array[startIndex + 4] === 101 /* e */ && array[startIndex + 5] === 97 /* a */ && array[startIndex + 6] === 110 /* n */) ? 61 /* BooleanKeyword */ : 11 /* IdentifierName */; case 114 /* r */: - return (array[startIndex + 1] === 101 /* e */ && array[startIndex + 2] === 113 /* q */ && array[startIndex + 3] === 117 /* u */ && array[startIndex + 4] === 105 /* i */ && array[startIndex + 5] === 114 /* r */ && array[startIndex + 6] === 101 /* e */) ? 66 /* RequireKeyword */ : 11 /* IdentifierName */; + return (array[startIndex + 1] === 101 /* e */ && array[startIndex + 2] === 113 /* q */ && array[startIndex + 3] === 117 /* u */ && array[startIndex + 4] === 105 /* i */ && array[startIndex + 5] === 114 /* r */ && array[startIndex + 6] === 101 /* e */) ? 67 /* RequireKeyword */ : 11 /* IdentifierName */; default: return 11 /* IdentifierName */; } @@ -6680,7 +6748,7 @@ var TypeScript; } case 11: - return (array[startIndex] === 99 /* c */ && array[startIndex + 1] === 111 /* o */ && array[startIndex + 2] === 110 /* n */ && array[startIndex + 3] === 115 /* s */ && array[startIndex + 4] === 116 /* t */ && array[startIndex + 5] === 114 /* r */ && array[startIndex + 6] === 117 /* u */ && array[startIndex + 7] === 99 /* c */ && array[startIndex + 8] === 116 /* t */ && array[startIndex + 9] === 111 /* o */ && array[startIndex + 10] === 114 /* r */) ? 62 /* ConstructorKeyword */ : 11 /* IdentifierName */; + return (array[startIndex] === 99 /* c */ && array[startIndex + 1] === 111 /* o */ && array[startIndex + 2] === 110 /* n */ && array[startIndex + 3] === 115 /* s */ && array[startIndex + 4] === 116 /* t */ && array[startIndex + 5] === 114 /* r */ && array[startIndex + 6] === 117 /* u */ && array[startIndex + 7] === 99 /* c */ && array[startIndex + 8] === 116 /* t */ && array[startIndex + 9] === 111 /* o */ && array[startIndex + 10] === 114 /* r */) ? 63 /* ConstructorKeyword */ : 11 /* IdentifierName */; default: return 11 /* IdentifierName */; } @@ -7332,9 +7400,9 @@ var TypeScript; var parentPositionedNode = positionedToken.containingNode(); var parentNode = parentPositionedNode.node(); - if (parentNode.kind() === 121 /* QualifiedName */ && (parentNode).right === token) { + if (parentNode.kind() === 122 /* QualifiedName */ && (parentNode).right === token) { return parentPositionedNode; - } else if (parentNode.kind() === 211 /* MemberAccessExpression */ && (parentNode).name === token) { + } else if (parentNode.kind() === 212 /* MemberAccessExpression */ && (parentNode).name === token) { return parentPositionedNode; } } @@ -7350,9 +7418,9 @@ var TypeScript; if (parent !== null) { switch (parent.kind()) { - case 246 /* ModuleNameModuleReference */: + case 247 /* ModuleNameModuleReference */: return true; - case 121 /* QualifiedName */: + case 122 /* QualifiedName */: return true; default: return isInTypeOnlyContext(positionedToken); @@ -7373,13 +7441,13 @@ var TypeScript; if (parent !== null) { switch (parent.kind()) { - case 124 /* ArrayType */: + case 125 /* ArrayType */: return (parent).type === nodeOrToken; - case 219 /* CastExpression */: + case 220 /* CastExpression */: return (parent).type === nodeOrToken; - case 244 /* TypeAnnotation */: - case 229 /* HeritageClause */: - case 227 /* TypeArgumentList */: + case 245 /* TypeAnnotation */: + case 230 /* HeritageClause */: + case 228 /* TypeArgumentList */: return true; } } @@ -7578,27 +7646,27 @@ var TypeScript; Syntax.stringLiteralExpression = stringLiteralExpression; function isSuperInvocationExpression(node) { - return node.kind() === 212 /* InvocationExpression */ && (node).expression.kind() === 50 /* SuperKeyword */; + return node.kind() === 213 /* InvocationExpression */ && (node).expression.kind() === 50 /* SuperKeyword */; } Syntax.isSuperInvocationExpression = isSuperInvocationExpression; function isSuperInvocationExpressionStatement(node) { - return node.kind() === 148 /* ExpressionStatement */ && isSuperInvocationExpression((node).expression); + return node.kind() === 149 /* ExpressionStatement */ && isSuperInvocationExpression((node).expression); } Syntax.isSuperInvocationExpressionStatement = isSuperInvocationExpressionStatement; function isSuperMemberAccessExpression(node) { - return node.kind() === 211 /* MemberAccessExpression */ && (node).expression.kind() === 50 /* SuperKeyword */; + return node.kind() === 212 /* MemberAccessExpression */ && (node).expression.kind() === 50 /* SuperKeyword */; } Syntax.isSuperMemberAccessExpression = isSuperMemberAccessExpression; function isSuperMemberAccessInvocationExpression(node) { - return node.kind() === 212 /* InvocationExpression */ && isSuperMemberAccessExpression((node).expression); + return node.kind() === 213 /* InvocationExpression */ && isSuperMemberAccessExpression((node).expression); } Syntax.isSuperMemberAccessInvocationExpression = isSuperMemberAccessInvocationExpression; function assignmentExpression(left, token, right) { - return TypeScript.Syntax.normalModeFactory.binaryExpression(173 /* AssignmentExpression */, left, token, right); + return TypeScript.Syntax.normalModeFactory.binaryExpression(174 /* AssignmentExpression */, left, token, right); } Syntax.assignmentExpression = assignmentExpression; @@ -7810,8 +7878,8 @@ var TypeScript; function isIntegerLiteral(expression) { if (expression) { switch (expression.kind()) { - case 163 /* PlusExpression */: - case 164 /* NegateExpression */: + case 164 /* PlusExpression */: + case 165 /* NegateExpression */: expression = (expression).operand; return isInteger((expression).text()); @@ -7845,8 +7913,8 @@ var TypeScript; NormalModeFactory.prototype.sourceUnit = function (moduleElements, endOfFileToken) { return new TypeScript.SourceUnitSyntax(moduleElements, endOfFileToken, false); }; - NormalModeFactory.prototype.externalModuleReference = function (requireKeyword, openParenToken, stringLiteral, closeParenToken) { - return new TypeScript.ExternalModuleReferenceSyntax(requireKeyword, openParenToken, stringLiteral, closeParenToken, false); + NormalModeFactory.prototype.externalModuleReference = function (moduleOrRequireKeyword, openParenToken, stringLiteral, closeParenToken) { + return new TypeScript.ExternalModuleReferenceSyntax(moduleOrRequireKeyword, openParenToken, stringLiteral, closeParenToken, false); }; NormalModeFactory.prototype.moduleNameModuleReference = function (moduleName) { return new TypeScript.ModuleNameModuleReferenceSyntax(moduleName, false); @@ -8110,8 +8178,8 @@ var TypeScript; StrictModeFactory.prototype.sourceUnit = function (moduleElements, endOfFileToken) { return new TypeScript.SourceUnitSyntax(moduleElements, endOfFileToken, true); }; - StrictModeFactory.prototype.externalModuleReference = function (requireKeyword, openParenToken, stringLiteral, closeParenToken) { - return new TypeScript.ExternalModuleReferenceSyntax(requireKeyword, openParenToken, stringLiteral, closeParenToken, true); + StrictModeFactory.prototype.externalModuleReference = function (moduleOrRequireKeyword, openParenToken, stringLiteral, closeParenToken) { + return new TypeScript.ExternalModuleReferenceSyntax(moduleOrRequireKeyword, openParenToken, stringLiteral, closeParenToken, true); }; StrictModeFactory.prototype.moduleNameModuleReference = function (moduleName) { return new TypeScript.ModuleNameModuleReferenceSyntax(moduleName, true); @@ -8378,7 +8446,7 @@ var TypeScript; (function (TypeScript) { (function (SyntaxFacts) { function isDirectivePrologueElement(node) { - if (node.kind() === 148 /* ExpressionStatement */) { + if (node.kind() === 149 /* ExpressionStatement */) { var expressionStatement = node; var expression = expressionStatement.expression; @@ -9013,7 +9081,7 @@ var TypeScript; }; SyntaxNode.prototype.tryGetEndOfFileAt = function (position) { - if (this.kind() === 120 /* SourceUnit */ && position === this.fullWidth()) { + if (this.kind() === 121 /* SourceUnit */ && position === this.fullWidth()) { var sourceUnit = this; return new TypeScript.PositionedToken(new TypeScript.PositionedNode(null, sourceUnit, 0), sourceUnit.endOfFileToken, sourceUnit.moduleElements.fullWidth()); } @@ -9150,7 +9218,7 @@ var TypeScript; }; SourceUnitSyntax.prototype.kind = function () { - return 120 /* SourceUnit */; + return 121 /* SourceUnit */; }; SourceUnitSyntax.prototype.childCount = function () { @@ -9240,9 +9308,9 @@ var TypeScript; var ExternalModuleReferenceSyntax = (function (_super) { __extends(ExternalModuleReferenceSyntax, _super); - function ExternalModuleReferenceSyntax(requireKeyword, openParenToken, stringLiteral, closeParenToken, parsedInStrictMode) { + function ExternalModuleReferenceSyntax(moduleOrRequireKeyword, openParenToken, stringLiteral, closeParenToken, parsedInStrictMode) { _super.call(this, parsedInStrictMode); - this.requireKeyword = requireKeyword; + this.moduleOrRequireKeyword = moduleOrRequireKeyword; this.openParenToken = openParenToken; this.stringLiteral = stringLiteral; this.closeParenToken = closeParenToken; @@ -9252,7 +9320,7 @@ var TypeScript; }; ExternalModuleReferenceSyntax.prototype.kind = function () { - return 245 /* ExternalModuleReference */; + return 246 /* ExternalModuleReference */; }; ExternalModuleReferenceSyntax.prototype.childCount = function () { @@ -9262,7 +9330,7 @@ var TypeScript; ExternalModuleReferenceSyntax.prototype.childAt = function (slot) { switch (slot) { case 0: - return this.requireKeyword; + return this.moduleOrRequireKeyword; case 1: return this.openParenToken; case 2: @@ -9274,16 +9342,16 @@ var TypeScript; } }; - ExternalModuleReferenceSyntax.prototype.update = function (requireKeyword, openParenToken, stringLiteral, closeParenToken) { - if (this.requireKeyword === requireKeyword && this.openParenToken === openParenToken && this.stringLiteral === stringLiteral && this.closeParenToken === closeParenToken) { + ExternalModuleReferenceSyntax.prototype.update = function (moduleOrRequireKeyword, openParenToken, stringLiteral, closeParenToken) { + if (this.moduleOrRequireKeyword === moduleOrRequireKeyword && this.openParenToken === openParenToken && this.stringLiteral === stringLiteral && this.closeParenToken === closeParenToken) { return this; } - return new ExternalModuleReferenceSyntax(requireKeyword, openParenToken, stringLiteral, closeParenToken, this.parsedInStrictMode()); + return new ExternalModuleReferenceSyntax(moduleOrRequireKeyword, openParenToken, stringLiteral, closeParenToken, this.parsedInStrictMode()); }; - ExternalModuleReferenceSyntax.create1 = function (stringLiteral) { - return new ExternalModuleReferenceSyntax(TypeScript.Syntax.token(66 /* RequireKeyword */), TypeScript.Syntax.token(72 /* OpenParenToken */), stringLiteral, TypeScript.Syntax.token(73 /* CloseParenToken */), false); + ExternalModuleReferenceSyntax.create1 = function (moduleOrRequireKeyword, stringLiteral) { + return new ExternalModuleReferenceSyntax(moduleOrRequireKeyword, TypeScript.Syntax.token(73 /* OpenParenToken */), stringLiteral, TypeScript.Syntax.token(74 /* CloseParenToken */), false); }; ExternalModuleReferenceSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -9294,20 +9362,20 @@ var TypeScript; return _super.prototype.withTrailingTrivia.call(this, trivia); }; - ExternalModuleReferenceSyntax.prototype.withRequireKeyword = function (requireKeyword) { - return this.update(requireKeyword, this.openParenToken, this.stringLiteral, this.closeParenToken); + ExternalModuleReferenceSyntax.prototype.withModuleOrRequireKeyword = function (moduleOrRequireKeyword) { + return this.update(moduleOrRequireKeyword, this.openParenToken, this.stringLiteral, this.closeParenToken); }; ExternalModuleReferenceSyntax.prototype.withOpenParenToken = function (openParenToken) { - return this.update(this.requireKeyword, openParenToken, this.stringLiteral, this.closeParenToken); + return this.update(this.moduleOrRequireKeyword, openParenToken, this.stringLiteral, this.closeParenToken); }; ExternalModuleReferenceSyntax.prototype.withStringLiteral = function (stringLiteral) { - return this.update(this.requireKeyword, this.openParenToken, stringLiteral, this.closeParenToken); + return this.update(this.moduleOrRequireKeyword, this.openParenToken, stringLiteral, this.closeParenToken); }; ExternalModuleReferenceSyntax.prototype.withCloseParenToken = function (closeParenToken) { - return this.update(this.requireKeyword, this.openParenToken, this.stringLiteral, closeParenToken); + return this.update(this.moduleOrRequireKeyword, this.openParenToken, this.stringLiteral, closeParenToken); }; ExternalModuleReferenceSyntax.prototype.isTypeScriptSpecific = function () { @@ -9328,7 +9396,7 @@ var TypeScript; }; ModuleNameModuleReferenceSyntax.prototype.kind = function () { - return 246 /* ModuleNameModuleReference */; + return 247 /* ModuleNameModuleReference */; }; ModuleNameModuleReferenceSyntax.prototype.childCount = function () { @@ -9387,7 +9455,7 @@ var TypeScript; }; ImportDeclarationSyntax.prototype.kind = function () { - return 133 /* ImportDeclaration */; + return 134 /* ImportDeclaration */; }; ImportDeclarationSyntax.prototype.childCount = function () { @@ -9430,7 +9498,7 @@ var TypeScript; }; ImportDeclarationSyntax.create1 = function (identifier, moduleReference) { - return new ImportDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(49 /* ImportKeyword */), identifier, TypeScript.Syntax.token(107 /* EqualsToken */), moduleReference, TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new ImportDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(49 /* ImportKeyword */), identifier, TypeScript.Syntax.token(108 /* EqualsToken */), moduleReference, TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; ImportDeclarationSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -9490,7 +9558,7 @@ var TypeScript; }; ExportAssignmentSyntax.prototype.kind = function () { - return 134 /* ExportAssignment */; + return 135 /* ExportAssignment */; }; ExportAssignmentSyntax.prototype.childCount = function () { @@ -9525,7 +9593,7 @@ var TypeScript; }; ExportAssignmentSyntax.create1 = function (identifier) { - return new ExportAssignmentSyntax(TypeScript.Syntax.token(47 /* ExportKeyword */), TypeScript.Syntax.token(107 /* EqualsToken */), identifier, TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new ExportAssignmentSyntax(TypeScript.Syntax.token(47 /* ExportKeyword */), TypeScript.Syntax.token(108 /* EqualsToken */), identifier, TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; ExportAssignmentSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -9577,7 +9645,7 @@ var TypeScript; }; ClassDeclarationSyntax.prototype.kind = function () { - return 131 /* ClassDeclaration */; + return 132 /* ClassDeclaration */; }; ClassDeclarationSyntax.prototype.childCount = function () { @@ -9624,7 +9692,7 @@ var TypeScript; }; ClassDeclarationSyntax.create1 = function (identifier) { - return new ClassDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(44 /* ClassKeyword */), identifier, null, TypeScript.Syntax.emptyList, TypeScript.Syntax.token(70 /* OpenBraceToken */), TypeScript.Syntax.emptyList, TypeScript.Syntax.token(71 /* CloseBraceToken */), false); + return new ClassDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(44 /* ClassKeyword */), identifier, null, TypeScript.Syntax.emptyList, TypeScript.Syntax.token(71 /* OpenBraceToken */), TypeScript.Syntax.emptyList, TypeScript.Syntax.token(72 /* CloseBraceToken */), false); }; ClassDeclarationSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -9702,7 +9770,7 @@ var TypeScript; }; InterfaceDeclarationSyntax.prototype.kind = function () { - return 128 /* InterfaceDeclaration */; + return 129 /* InterfaceDeclaration */; }; InterfaceDeclarationSyntax.prototype.childCount = function () { @@ -9807,7 +9875,7 @@ var TypeScript; }; HeritageClauseSyntax.prototype.kind = function () { - return 229 /* HeritageClause */; + return 230 /* HeritageClause */; }; HeritageClauseSyntax.prototype.childCount = function () { @@ -9877,7 +9945,7 @@ var TypeScript; }; ModuleDeclarationSyntax.prototype.kind = function () { - return 130 /* ModuleDeclaration */; + return 131 /* ModuleDeclaration */; }; ModuleDeclarationSyntax.prototype.childCount = function () { @@ -9922,7 +9990,7 @@ var TypeScript; }; ModuleDeclarationSyntax.create1 = function () { - return new ModuleDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(65 /* ModuleKeyword */), null, null, TypeScript.Syntax.token(70 /* OpenBraceToken */), TypeScript.Syntax.emptyList, TypeScript.Syntax.token(71 /* CloseBraceToken */), false); + return new ModuleDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(66 /* ModuleKeyword */), null, null, TypeScript.Syntax.token(71 /* OpenBraceToken */), TypeScript.Syntax.emptyList, TypeScript.Syntax.token(72 /* CloseBraceToken */), false); }; ModuleDeclarationSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -9992,7 +10060,7 @@ var TypeScript; }; FunctionDeclarationSyntax.prototype.kind = function () { - return 129 /* FunctionDeclaration */; + return 130 /* FunctionDeclaration */; }; FunctionDeclarationSyntax.prototype.childCount = function () { @@ -10107,7 +10175,7 @@ var TypeScript; }; VariableStatementSyntax.prototype.kind = function () { - return 147 /* VariableStatement */; + return 148 /* VariableStatement */; }; VariableStatementSyntax.prototype.childCount = function () { @@ -10148,7 +10216,7 @@ var TypeScript; }; VariableStatementSyntax.create1 = function (variableDeclaration) { - return new VariableStatementSyntax(TypeScript.Syntax.emptyList, variableDeclaration, TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new VariableStatementSyntax(TypeScript.Syntax.emptyList, variableDeclaration, TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; VariableStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -10200,7 +10268,7 @@ var TypeScript; }; VariableDeclarationSyntax.prototype.kind = function () { - return 223 /* VariableDeclaration */; + return 224 /* VariableDeclaration */; }; VariableDeclarationSyntax.prototype.childCount = function () { @@ -10273,7 +10341,7 @@ var TypeScript; }; VariableDeclaratorSyntax.prototype.kind = function () { - return 224 /* VariableDeclarator */; + return 225 /* VariableDeclarator */; }; VariableDeclaratorSyntax.prototype.childCount = function () { @@ -10354,7 +10422,7 @@ var TypeScript; }; EqualsValueClauseSyntax.prototype.kind = function () { - return 230 /* EqualsValueClause */; + return 231 /* EqualsValueClause */; }; EqualsValueClauseSyntax.prototype.childCount = function () { @@ -10381,7 +10449,7 @@ var TypeScript; }; EqualsValueClauseSyntax.create1 = function (value) { - return new EqualsValueClauseSyntax(TypeScript.Syntax.token(107 /* EqualsToken */), value, false); + return new EqualsValueClauseSyntax(TypeScript.Syntax.token(108 /* EqualsToken */), value, false); }; EqualsValueClauseSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -10501,7 +10569,7 @@ var TypeScript; }; ArrayLiteralExpressionSyntax.prototype.kind = function () { - return 213 /* ArrayLiteralExpression */; + return 214 /* ArrayLiteralExpression */; }; ArrayLiteralExpressionSyntax.prototype.childCount = function () { @@ -10542,7 +10610,7 @@ var TypeScript; }; ArrayLiteralExpressionSyntax.create1 = function () { - return new ArrayLiteralExpressionSyntax(TypeScript.Syntax.token(74 /* OpenBracketToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(75 /* CloseBracketToken */), false); + return new ArrayLiteralExpressionSyntax(TypeScript.Syntax.token(75 /* OpenBracketToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(76 /* CloseBracketToken */), false); }; ArrayLiteralExpressionSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -10589,7 +10657,7 @@ var TypeScript; }; OmittedExpressionSyntax.prototype.kind = function () { - return 222 /* OmittedExpression */; + return 223 /* OmittedExpression */; }; OmittedExpressionSyntax.prototype.childCount = function () { @@ -10636,7 +10704,7 @@ var TypeScript; }; ParenthesizedExpressionSyntax.prototype.kind = function () { - return 216 /* ParenthesizedExpression */; + return 217 /* ParenthesizedExpression */; }; ParenthesizedExpressionSyntax.prototype.childCount = function () { @@ -10673,7 +10741,7 @@ var TypeScript; }; ParenthesizedExpressionSyntax.create1 = function (expression) { - return new ParenthesizedExpressionSyntax(TypeScript.Syntax.token(72 /* OpenParenToken */), expression, TypeScript.Syntax.token(73 /* CloseParenToken */), false); + return new ParenthesizedExpressionSyntax(TypeScript.Syntax.token(73 /* OpenParenToken */), expression, TypeScript.Syntax.token(74 /* CloseParenToken */), false); }; ParenthesizedExpressionSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -10747,7 +10815,7 @@ var TypeScript; }; SimpleArrowFunctionExpressionSyntax.prototype.kind = function () { - return 218 /* SimpleArrowFunctionExpression */; + return 219 /* SimpleArrowFunctionExpression */; }; SimpleArrowFunctionExpressionSyntax.prototype.childCount = function () { @@ -10776,7 +10844,7 @@ var TypeScript; }; SimpleArrowFunctionExpressionSyntax.create1 = function (identifier, body) { - return new SimpleArrowFunctionExpressionSyntax(identifier, TypeScript.Syntax.token(85 /* EqualsGreaterThanToken */), body, false); + return new SimpleArrowFunctionExpressionSyntax(identifier, TypeScript.Syntax.token(86 /* EqualsGreaterThanToken */), body, false); }; SimpleArrowFunctionExpressionSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -10817,7 +10885,7 @@ var TypeScript; }; ParenthesizedArrowFunctionExpressionSyntax.prototype.kind = function () { - return 217 /* ParenthesizedArrowFunctionExpression */; + return 218 /* ParenthesizedArrowFunctionExpression */; }; ParenthesizedArrowFunctionExpressionSyntax.prototype.childCount = function () { @@ -10846,7 +10914,7 @@ var TypeScript; }; ParenthesizedArrowFunctionExpressionSyntax.create1 = function (body) { - return new ParenthesizedArrowFunctionExpressionSyntax(CallSignatureSyntax.create1(), TypeScript.Syntax.token(85 /* EqualsGreaterThanToken */), body, false); + return new ParenthesizedArrowFunctionExpressionSyntax(CallSignatureSyntax.create1(), TypeScript.Syntax.token(86 /* EqualsGreaterThanToken */), body, false); }; ParenthesizedArrowFunctionExpressionSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -10889,7 +10957,7 @@ var TypeScript; }; QualifiedNameSyntax.prototype.kind = function () { - return 121 /* QualifiedName */; + return 122 /* QualifiedName */; }; QualifiedNameSyntax.prototype.childCount = function () { @@ -10934,7 +11002,7 @@ var TypeScript; }; QualifiedNameSyntax.create1 = function (left, right) { - return new QualifiedNameSyntax(left, TypeScript.Syntax.token(76 /* DotToken */), right, false); + return new QualifiedNameSyntax(left, TypeScript.Syntax.token(77 /* DotToken */), right, false); }; QualifiedNameSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -10977,7 +11045,7 @@ var TypeScript; }; TypeArgumentListSyntax.prototype.kind = function () { - return 227 /* TypeArgumentList */; + return 228 /* TypeArgumentList */; }; TypeArgumentListSyntax.prototype.childCount = function () { @@ -11010,7 +11078,7 @@ var TypeScript; }; TypeArgumentListSyntax.create1 = function () { - return new TypeArgumentListSyntax(TypeScript.Syntax.token(80 /* LessThanToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(81 /* GreaterThanToken */), false); + return new TypeArgumentListSyntax(TypeScript.Syntax.token(81 /* LessThanToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(82 /* GreaterThanToken */), false); }; TypeArgumentListSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -11059,7 +11127,7 @@ var TypeScript; }; ConstructorTypeSyntax.prototype.kind = function () { - return 125 /* ConstructorType */; + return 126 /* ConstructorType */; }; ConstructorTypeSyntax.prototype.childCount = function () { @@ -11108,7 +11176,7 @@ var TypeScript; }; ConstructorTypeSyntax.create1 = function (type) { - return new ConstructorTypeSyntax(TypeScript.Syntax.token(31 /* NewKeyword */), null, ParameterListSyntax.create1(), TypeScript.Syntax.token(85 /* EqualsGreaterThanToken */), type, false); + return new ConstructorTypeSyntax(TypeScript.Syntax.token(31 /* NewKeyword */), null, ParameterListSyntax.create1(), TypeScript.Syntax.token(86 /* EqualsGreaterThanToken */), type, false); }; ConstructorTypeSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -11160,7 +11228,7 @@ var TypeScript; }; FunctionTypeSyntax.prototype.kind = function () { - return 123 /* FunctionType */; + return 124 /* FunctionType */; }; FunctionTypeSyntax.prototype.childCount = function () { @@ -11207,7 +11275,7 @@ var TypeScript; }; FunctionTypeSyntax.create1 = function (type) { - return new FunctionTypeSyntax(null, ParameterListSyntax.create1(), TypeScript.Syntax.token(85 /* EqualsGreaterThanToken */), type, false); + return new FunctionTypeSyntax(null, ParameterListSyntax.create1(), TypeScript.Syntax.token(86 /* EqualsGreaterThanToken */), type, false); }; FunctionTypeSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -11254,7 +11322,7 @@ var TypeScript; }; ObjectTypeSyntax.prototype.kind = function () { - return 122 /* ObjectType */; + return 123 /* ObjectType */; }; ObjectTypeSyntax.prototype.childCount = function () { @@ -11299,7 +11367,7 @@ var TypeScript; }; ObjectTypeSyntax.create1 = function () { - return new ObjectTypeSyntax(TypeScript.Syntax.token(70 /* OpenBraceToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(71 /* CloseBraceToken */), false); + return new ObjectTypeSyntax(TypeScript.Syntax.token(71 /* OpenBraceToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(72 /* CloseBraceToken */), false); }; ObjectTypeSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -11346,7 +11414,7 @@ var TypeScript; }; ArrayTypeSyntax.prototype.kind = function () { - return 124 /* ArrayType */; + return 125 /* ArrayType */; }; ArrayTypeSyntax.prototype.childCount = function () { @@ -11387,7 +11455,7 @@ var TypeScript; }; ArrayTypeSyntax.create1 = function (type) { - return new ArrayTypeSyntax(type, TypeScript.Syntax.token(74 /* OpenBracketToken */), TypeScript.Syntax.token(75 /* CloseBracketToken */), false); + return new ArrayTypeSyntax(type, TypeScript.Syntax.token(75 /* OpenBracketToken */), TypeScript.Syntax.token(76 /* CloseBracketToken */), false); }; ArrayTypeSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -11429,7 +11497,7 @@ var TypeScript; }; GenericTypeSyntax.prototype.kind = function () { - return 126 /* GenericType */; + return 127 /* GenericType */; }; GenericTypeSyntax.prototype.childCount = function () { @@ -11506,7 +11574,7 @@ var TypeScript; }; TypeQuerySyntax.prototype.kind = function () { - return 127 /* TypeQuery */; + return 128 /* TypeQuery */; }; TypeQuerySyntax.prototype.childCount = function () { @@ -11583,7 +11651,7 @@ var TypeScript; }; TypeAnnotationSyntax.prototype.kind = function () { - return 244 /* TypeAnnotation */; + return 245 /* TypeAnnotation */; }; TypeAnnotationSyntax.prototype.childCount = function () { @@ -11610,7 +11678,7 @@ var TypeScript; }; TypeAnnotationSyntax.create1 = function (type) { - return new TypeAnnotationSyntax(TypeScript.Syntax.token(106 /* ColonToken */), type, false); + return new TypeAnnotationSyntax(TypeScript.Syntax.token(107 /* ColonToken */), type, false); }; TypeAnnotationSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -11649,7 +11717,7 @@ var TypeScript; }; BlockSyntax.prototype.kind = function () { - return 145 /* Block */; + return 146 /* Block */; }; BlockSyntax.prototype.childCount = function () { @@ -11690,7 +11758,7 @@ var TypeScript; }; BlockSyntax.create1 = function () { - return new BlockSyntax(TypeScript.Syntax.token(70 /* OpenBraceToken */), TypeScript.Syntax.emptyList, TypeScript.Syntax.token(71 /* CloseBraceToken */), false); + return new BlockSyntax(TypeScript.Syntax.token(71 /* OpenBraceToken */), TypeScript.Syntax.emptyList, TypeScript.Syntax.token(72 /* CloseBraceToken */), false); }; BlockSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -11743,7 +11811,7 @@ var TypeScript; }; ParameterSyntax.prototype.kind = function () { - return 242 /* Parameter */; + return 243 /* Parameter */; }; ParameterSyntax.prototype.childCount = function () { @@ -11852,7 +11920,7 @@ var TypeScript; }; MemberAccessExpressionSyntax.prototype.kind = function () { - return 211 /* MemberAccessExpression */; + return 212 /* MemberAccessExpression */; }; MemberAccessExpressionSyntax.prototype.childCount = function () { @@ -11889,7 +11957,7 @@ var TypeScript; }; MemberAccessExpressionSyntax.create1 = function (expression, name) { - return new MemberAccessExpressionSyntax(expression, TypeScript.Syntax.token(76 /* DotToken */), name, false); + return new MemberAccessExpressionSyntax(expression, TypeScript.Syntax.token(77 /* DotToken */), name, false); }; MemberAccessExpressionSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -12014,7 +12082,7 @@ var TypeScript; }; ElementAccessExpressionSyntax.prototype.kind = function () { - return 220 /* ElementAccessExpression */; + return 221 /* ElementAccessExpression */; }; ElementAccessExpressionSyntax.prototype.childCount = function () { @@ -12053,7 +12121,7 @@ var TypeScript; }; ElementAccessExpressionSyntax.create1 = function (expression, argumentExpression) { - return new ElementAccessExpressionSyntax(expression, TypeScript.Syntax.token(74 /* OpenBracketToken */), argumentExpression, TypeScript.Syntax.token(75 /* CloseBracketToken */), false); + return new ElementAccessExpressionSyntax(expression, TypeScript.Syntax.token(75 /* OpenBracketToken */), argumentExpression, TypeScript.Syntax.token(76 /* CloseBracketToken */), false); }; ElementAccessExpressionSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -12105,7 +12173,7 @@ var TypeScript; }; InvocationExpressionSyntax.prototype.kind = function () { - return 212 /* InvocationExpression */; + return 213 /* InvocationExpression */; }; InvocationExpressionSyntax.prototype.childCount = function () { @@ -12186,7 +12254,7 @@ var TypeScript; }; ArgumentListSyntax.prototype.kind = function () { - return 225 /* ArgumentList */; + return 226 /* ArgumentList */; }; ArgumentListSyntax.prototype.childCount = function () { @@ -12221,7 +12289,7 @@ var TypeScript; }; ArgumentListSyntax.create1 = function () { - return new ArgumentListSyntax(null, TypeScript.Syntax.token(72 /* OpenParenToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(73 /* CloseParenToken */), false); + return new ArgumentListSyntax(null, TypeScript.Syntax.token(73 /* OpenParenToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(74 /* CloseParenToken */), false); }; ArgumentListSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -12364,7 +12432,7 @@ var TypeScript; }; ConditionalExpressionSyntax.prototype.kind = function () { - return 185 /* ConditionalExpression */; + return 186 /* ConditionalExpression */; }; ConditionalExpressionSyntax.prototype.childCount = function () { @@ -12401,7 +12469,7 @@ var TypeScript; }; ConditionalExpressionSyntax.create1 = function (condition, whenTrue, whenFalse) { - return new ConditionalExpressionSyntax(condition, TypeScript.Syntax.token(105 /* QuestionToken */), whenTrue, TypeScript.Syntax.token(106 /* ColonToken */), whenFalse, false); + return new ConditionalExpressionSyntax(condition, TypeScript.Syntax.token(106 /* QuestionToken */), whenTrue, TypeScript.Syntax.token(107 /* ColonToken */), whenFalse, false); }; ConditionalExpressionSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -12460,7 +12528,7 @@ var TypeScript; }; ConstructSignatureSyntax.prototype.kind = function () { - return 142 /* ConstructSignature */; + return 143 /* ConstructSignature */; }; ConstructSignatureSyntax.prototype.childCount = function () { @@ -12530,7 +12598,7 @@ var TypeScript; }; MethodSignatureSyntax.prototype.kind = function () { - return 144 /* MethodSignature */; + return 145 /* MethodSignature */; }; MethodSignatureSyntax.prototype.childCount = function () { @@ -12614,7 +12682,7 @@ var TypeScript; }; IndexSignatureSyntax.prototype.kind = function () { - return 143 /* IndexSignature */; + return 144 /* IndexSignature */; }; IndexSignatureSyntax.prototype.childCount = function () { @@ -12657,7 +12725,7 @@ var TypeScript; }; IndexSignatureSyntax.create1 = function (parameter) { - return new IndexSignatureSyntax(TypeScript.Syntax.token(74 /* OpenBracketToken */), parameter, TypeScript.Syntax.token(75 /* CloseBracketToken */), null, false); + return new IndexSignatureSyntax(TypeScript.Syntax.token(75 /* OpenBracketToken */), parameter, TypeScript.Syntax.token(76 /* CloseBracketToken */), null, false); }; IndexSignatureSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -12704,7 +12772,7 @@ var TypeScript; }; PropertySignatureSyntax.prototype.kind = function () { - return 140 /* PropertySignature */; + return 141 /* PropertySignature */; }; PropertySignatureSyntax.prototype.childCount = function () { @@ -12784,7 +12852,7 @@ var TypeScript; }; CallSignatureSyntax.prototype.kind = function () { - return 141 /* CallSignature */; + return 142 /* CallSignature */; }; CallSignatureSyntax.prototype.childCount = function () { @@ -12873,7 +12941,7 @@ var TypeScript; }; ParameterListSyntax.prototype.kind = function () { - return 226 /* ParameterList */; + return 227 /* ParameterList */; }; ParameterListSyntax.prototype.childCount = function () { @@ -12906,7 +12974,7 @@ var TypeScript; }; ParameterListSyntax.create1 = function () { - return new ParameterListSyntax(TypeScript.Syntax.token(72 /* OpenParenToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(73 /* CloseParenToken */), false); + return new ParameterListSyntax(TypeScript.Syntax.token(73 /* OpenParenToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(74 /* CloseParenToken */), false); }; ParameterListSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -12956,7 +13024,7 @@ var TypeScript; }; TypeParameterListSyntax.prototype.kind = function () { - return 228 /* TypeParameterList */; + return 229 /* TypeParameterList */; }; TypeParameterListSyntax.prototype.childCount = function () { @@ -12989,7 +13057,7 @@ var TypeScript; }; TypeParameterListSyntax.create1 = function () { - return new TypeParameterListSyntax(TypeScript.Syntax.token(80 /* LessThanToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(81 /* GreaterThanToken */), false); + return new TypeParameterListSyntax(TypeScript.Syntax.token(81 /* LessThanToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(82 /* GreaterThanToken */), false); }; TypeParameterListSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -13035,7 +13103,7 @@ var TypeScript; }; TypeParameterSyntax.prototype.kind = function () { - return 236 /* TypeParameter */; + return 237 /* TypeParameter */; }; TypeParameterSyntax.prototype.childCount = function () { @@ -13104,7 +13172,7 @@ var TypeScript; }; ConstraintSyntax.prototype.kind = function () { - return 237 /* Constraint */; + return 238 /* Constraint */; }; ConstraintSyntax.prototype.childCount = function () { @@ -13169,7 +13237,7 @@ var TypeScript; }; ElseClauseSyntax.prototype.kind = function () { - return 233 /* ElseClause */; + return 234 /* ElseClause */; }; ElseClauseSyntax.prototype.childCount = function () { @@ -13241,7 +13309,7 @@ var TypeScript; }; IfStatementSyntax.prototype.kind = function () { - return 146 /* IfStatement */; + return 147 /* IfStatement */; }; IfStatementSyntax.prototype.childCount = function () { @@ -13288,7 +13356,7 @@ var TypeScript; }; IfStatementSyntax.create1 = function (condition, statement) { - return new IfStatementSyntax(TypeScript.Syntax.token(28 /* IfKeyword */), TypeScript.Syntax.token(72 /* OpenParenToken */), condition, TypeScript.Syntax.token(73 /* CloseParenToken */), statement, null, false); + return new IfStatementSyntax(TypeScript.Syntax.token(28 /* IfKeyword */), TypeScript.Syntax.token(73 /* OpenParenToken */), condition, TypeScript.Syntax.token(74 /* CloseParenToken */), statement, null, false); }; IfStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -13351,7 +13419,7 @@ var TypeScript; }; ExpressionStatementSyntax.prototype.kind = function () { - return 148 /* ExpressionStatement */; + return 149 /* ExpressionStatement */; }; ExpressionStatementSyntax.prototype.childCount = function () { @@ -13386,7 +13454,7 @@ var TypeScript; }; ExpressionStatementSyntax.create1 = function (expression) { - return new ExpressionStatementSyntax(expression, TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new ExpressionStatementSyntax(expression, TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; ExpressionStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -13429,7 +13497,7 @@ var TypeScript; }; ConstructorDeclarationSyntax.prototype.kind = function () { - return 137 /* ConstructorDeclaration */; + return 138 /* ConstructorDeclaration */; }; ConstructorDeclarationSyntax.prototype.childCount = function () { @@ -13468,7 +13536,7 @@ var TypeScript; }; ConstructorDeclarationSyntax.create1 = function () { - return new ConstructorDeclarationSyntax(TypeScript.Syntax.token(62 /* ConstructorKeyword */), ParameterListSyntax.create1(), null, null, false); + return new ConstructorDeclarationSyntax(TypeScript.Syntax.token(63 /* ConstructorKeyword */), ParameterListSyntax.create1(), null, null, false); }; ConstructorDeclarationSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -13517,7 +13585,7 @@ var TypeScript; }; MemberFunctionDeclarationSyntax.prototype.kind = function () { - return 135 /* MemberFunctionDeclaration */; + return 136 /* MemberFunctionDeclaration */; }; MemberFunctionDeclarationSyntax.prototype.childCount = function () { @@ -13648,7 +13716,7 @@ var TypeScript; }; GetMemberAccessorDeclarationSyntax.prototype.kind = function () { - return 138 /* GetMemberAccessorDeclaration */; + return 139 /* GetMemberAccessorDeclaration */; }; GetMemberAccessorDeclarationSyntax.prototype.childCount = function () { @@ -13687,7 +13755,7 @@ var TypeScript; }; GetMemberAccessorDeclarationSyntax.create1 = function (propertyName) { - return new GetMemberAccessorDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(64 /* GetKeyword */), propertyName, ParameterListSyntax.create1(), null, BlockSyntax.create1(), false); + return new GetMemberAccessorDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(65 /* GetKeyword */), propertyName, ParameterListSyntax.create1(), null, BlockSyntax.create1(), false); }; GetMemberAccessorDeclarationSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -13744,7 +13812,7 @@ var TypeScript; }; SetMemberAccessorDeclarationSyntax.prototype.kind = function () { - return 139 /* SetMemberAccessorDeclaration */; + return 140 /* SetMemberAccessorDeclaration */; }; SetMemberAccessorDeclarationSyntax.prototype.childCount = function () { @@ -13781,7 +13849,7 @@ var TypeScript; }; SetMemberAccessorDeclarationSyntax.create1 = function (propertyName) { - return new SetMemberAccessorDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(68 /* SetKeyword */), propertyName, ParameterListSyntax.create1(), BlockSyntax.create1(), false); + return new SetMemberAccessorDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(69 /* SetKeyword */), propertyName, ParameterListSyntax.create1(), BlockSyntax.create1(), false); }; SetMemberAccessorDeclarationSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -13836,7 +13904,7 @@ var TypeScript; }; MemberVariableDeclarationSyntax.prototype.kind = function () { - return 136 /* MemberVariableDeclaration */; + return 137 /* MemberVariableDeclaration */; }; MemberVariableDeclarationSyntax.prototype.childCount = function () { @@ -13877,7 +13945,7 @@ var TypeScript; }; MemberVariableDeclarationSyntax.create1 = function (variableDeclarator) { - return new MemberVariableDeclarationSyntax(TypeScript.Syntax.emptyList, variableDeclarator, TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new MemberVariableDeclarationSyntax(TypeScript.Syntax.emptyList, variableDeclarator, TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; MemberVariableDeclarationSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -13924,7 +13992,7 @@ var TypeScript; }; ThrowStatementSyntax.prototype.kind = function () { - return 156 /* ThrowStatement */; + return 157 /* ThrowStatement */; }; ThrowStatementSyntax.prototype.childCount = function () { @@ -13961,7 +14029,7 @@ var TypeScript; }; ThrowStatementSyntax.create1 = function (expression) { - return new ThrowStatementSyntax(TypeScript.Syntax.token(36 /* ThrowKeyword */), expression, TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new ThrowStatementSyntax(TypeScript.Syntax.token(36 /* ThrowKeyword */), expression, TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; ThrowStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -14007,7 +14075,7 @@ var TypeScript; }; ReturnStatementSyntax.prototype.kind = function () { - return 149 /* ReturnStatement */; + return 150 /* ReturnStatement */; }; ReturnStatementSyntax.prototype.childCount = function () { @@ -14048,7 +14116,7 @@ var TypeScript; }; ReturnStatementSyntax.create1 = function () { - return new ReturnStatementSyntax(TypeScript.Syntax.token(33 /* ReturnKeyword */), null, TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new ReturnStatementSyntax(TypeScript.Syntax.token(33 /* ReturnKeyword */), null, TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; ReturnStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -14094,7 +14162,7 @@ var TypeScript; }; ObjectCreationExpressionSyntax.prototype.kind = function () { - return 215 /* ObjectCreationExpression */; + return 216 /* ObjectCreationExpression */; }; ObjectCreationExpressionSyntax.prototype.childCount = function () { @@ -14188,7 +14256,7 @@ var TypeScript; }; SwitchStatementSyntax.prototype.kind = function () { - return 150 /* SwitchStatement */; + return 151 /* SwitchStatement */; }; SwitchStatementSyntax.prototype.childCount = function () { @@ -14237,7 +14305,7 @@ var TypeScript; }; SwitchStatementSyntax.create1 = function (expression) { - return new SwitchStatementSyntax(TypeScript.Syntax.token(34 /* SwitchKeyword */), TypeScript.Syntax.token(72 /* OpenParenToken */), expression, TypeScript.Syntax.token(73 /* CloseParenToken */), TypeScript.Syntax.token(70 /* OpenBraceToken */), TypeScript.Syntax.emptyList, TypeScript.Syntax.token(71 /* CloseBraceToken */), false); + return new SwitchStatementSyntax(TypeScript.Syntax.token(34 /* SwitchKeyword */), TypeScript.Syntax.token(73 /* OpenParenToken */), expression, TypeScript.Syntax.token(74 /* CloseParenToken */), TypeScript.Syntax.token(71 /* OpenBraceToken */), TypeScript.Syntax.emptyList, TypeScript.Syntax.token(72 /* CloseBraceToken */), false); }; SwitchStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -14331,7 +14399,7 @@ var TypeScript; }; CaseSwitchClauseSyntax.prototype.kind = function () { - return 231 /* CaseSwitchClause */; + return 232 /* CaseSwitchClause */; }; CaseSwitchClauseSyntax.prototype.childCount = function () { @@ -14366,7 +14434,7 @@ var TypeScript; }; CaseSwitchClauseSyntax.create1 = function (expression) { - return new CaseSwitchClauseSyntax(TypeScript.Syntax.token(16 /* CaseKeyword */), expression, TypeScript.Syntax.token(106 /* ColonToken */), TypeScript.Syntax.emptyList, false); + return new CaseSwitchClauseSyntax(TypeScript.Syntax.token(16 /* CaseKeyword */), expression, TypeScript.Syntax.token(107 /* ColonToken */), TypeScript.Syntax.emptyList, false); }; CaseSwitchClauseSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -14421,7 +14489,7 @@ var TypeScript; }; DefaultSwitchClauseSyntax.prototype.kind = function () { - return 232 /* DefaultSwitchClause */; + return 233 /* DefaultSwitchClause */; }; DefaultSwitchClauseSyntax.prototype.childCount = function () { @@ -14454,7 +14522,7 @@ var TypeScript; }; DefaultSwitchClauseSyntax.create1 = function () { - return new DefaultSwitchClauseSyntax(TypeScript.Syntax.token(20 /* DefaultKeyword */), TypeScript.Syntax.token(106 /* ColonToken */), TypeScript.Syntax.emptyList, false); + return new DefaultSwitchClauseSyntax(TypeScript.Syntax.token(20 /* DefaultKeyword */), TypeScript.Syntax.token(107 /* ColonToken */), TypeScript.Syntax.emptyList, false); }; DefaultSwitchClauseSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -14504,7 +14572,7 @@ var TypeScript; }; BreakStatementSyntax.prototype.kind = function () { - return 151 /* BreakStatement */; + return 152 /* BreakStatement */; }; BreakStatementSyntax.prototype.childCount = function () { @@ -14545,7 +14613,7 @@ var TypeScript; }; BreakStatementSyntax.create1 = function () { - return new BreakStatementSyntax(TypeScript.Syntax.token(15 /* BreakKeyword */), null, TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new BreakStatementSyntax(TypeScript.Syntax.token(15 /* BreakKeyword */), null, TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; BreakStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -14588,7 +14656,7 @@ var TypeScript; }; ContinueStatementSyntax.prototype.kind = function () { - return 152 /* ContinueStatement */; + return 153 /* ContinueStatement */; }; ContinueStatementSyntax.prototype.childCount = function () { @@ -14629,7 +14697,7 @@ var TypeScript; }; ContinueStatementSyntax.create1 = function () { - return new ContinueStatementSyntax(TypeScript.Syntax.token(18 /* ContinueKeyword */), null, TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new ContinueStatementSyntax(TypeScript.Syntax.token(18 /* ContinueKeyword */), null, TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; ContinueStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -14727,7 +14795,7 @@ var TypeScript; }; ForStatementSyntax.prototype.kind = function () { - return 153 /* ForStatement */; + return 154 /* ForStatement */; }; ForStatementSyntax.prototype.childCount = function () { @@ -14774,7 +14842,7 @@ var TypeScript; }; ForStatementSyntax.create1 = function (statement) { - return new ForStatementSyntax(TypeScript.Syntax.token(26 /* ForKeyword */), TypeScript.Syntax.token(72 /* OpenParenToken */), null, null, TypeScript.Syntax.token(78 /* SemicolonToken */), null, TypeScript.Syntax.token(78 /* SemicolonToken */), null, TypeScript.Syntax.token(73 /* CloseParenToken */), statement, false); + return new ForStatementSyntax(TypeScript.Syntax.token(26 /* ForKeyword */), TypeScript.Syntax.token(73 /* OpenParenToken */), null, null, TypeScript.Syntax.token(79 /* SemicolonToken */), null, TypeScript.Syntax.token(79 /* SemicolonToken */), null, TypeScript.Syntax.token(74 /* CloseParenToken */), statement, false); }; ForStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -14860,7 +14928,7 @@ var TypeScript; }; ForInStatementSyntax.prototype.kind = function () { - return 154 /* ForInStatement */; + return 155 /* ForInStatement */; }; ForInStatementSyntax.prototype.childCount = function () { @@ -14903,7 +14971,7 @@ var TypeScript; }; ForInStatementSyntax.create1 = function (expression, statement) { - return new ForInStatementSyntax(TypeScript.Syntax.token(26 /* ForKeyword */), TypeScript.Syntax.token(72 /* OpenParenToken */), null, null, TypeScript.Syntax.token(29 /* InKeyword */), expression, TypeScript.Syntax.token(73 /* CloseParenToken */), statement, false); + return new ForInStatementSyntax(TypeScript.Syntax.token(26 /* ForKeyword */), TypeScript.Syntax.token(73 /* OpenParenToken */), null, null, TypeScript.Syntax.token(29 /* InKeyword */), expression, TypeScript.Syntax.token(74 /* CloseParenToken */), statement, false); }; ForInStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -14977,7 +15045,7 @@ var TypeScript; }; WhileStatementSyntax.prototype.kind = function () { - return 157 /* WhileStatement */; + return 158 /* WhileStatement */; }; WhileStatementSyntax.prototype.childCount = function () { @@ -15010,7 +15078,7 @@ var TypeScript; }; WhileStatementSyntax.create1 = function (condition, statement) { - return new WhileStatementSyntax(TypeScript.Syntax.token(42 /* WhileKeyword */), TypeScript.Syntax.token(72 /* OpenParenToken */), condition, TypeScript.Syntax.token(73 /* CloseParenToken */), statement, false); + return new WhileStatementSyntax(TypeScript.Syntax.token(42 /* WhileKeyword */), TypeScript.Syntax.token(73 /* OpenParenToken */), condition, TypeScript.Syntax.token(74 /* CloseParenToken */), statement, false); }; WhileStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -15069,7 +15137,7 @@ var TypeScript; }; WithStatementSyntax.prototype.kind = function () { - return 162 /* WithStatement */; + return 163 /* WithStatement */; }; WithStatementSyntax.prototype.childCount = function () { @@ -15110,7 +15178,7 @@ var TypeScript; }; WithStatementSyntax.create1 = function (condition, statement) { - return new WithStatementSyntax(TypeScript.Syntax.token(43 /* WithKeyword */), TypeScript.Syntax.token(72 /* OpenParenToken */), condition, TypeScript.Syntax.token(73 /* CloseParenToken */), statement, false); + return new WithStatementSyntax(TypeScript.Syntax.token(43 /* WithKeyword */), TypeScript.Syntax.token(73 /* OpenParenToken */), condition, TypeScript.Syntax.token(74 /* CloseParenToken */), statement, false); }; WithStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -15170,7 +15238,7 @@ var TypeScript; }; EnumDeclarationSyntax.prototype.kind = function () { - return 132 /* EnumDeclaration */; + return 133 /* EnumDeclaration */; }; EnumDeclarationSyntax.prototype.childCount = function () { @@ -15213,7 +15281,7 @@ var TypeScript; }; EnumDeclarationSyntax.create1 = function (identifier) { - return new EnumDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(46 /* EnumKeyword */), identifier, TypeScript.Syntax.token(70 /* OpenBraceToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(71 /* CloseBraceToken */), false); + return new EnumDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(46 /* EnumKeyword */), identifier, TypeScript.Syntax.token(71 /* OpenBraceToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(72 /* CloseBraceToken */), false); }; EnumDeclarationSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -15275,7 +15343,7 @@ var TypeScript; }; EnumElementSyntax.prototype.kind = function () { - return 243 /* EnumElement */; + return 244 /* EnumElement */; }; EnumElementSyntax.prototype.childCount = function () { @@ -15349,7 +15417,7 @@ var TypeScript; }; CastExpressionSyntax.prototype.kind = function () { - return 219 /* CastExpression */; + return 220 /* CastExpression */; }; CastExpressionSyntax.prototype.childCount = function () { @@ -15388,7 +15456,7 @@ var TypeScript; }; CastExpressionSyntax.create1 = function (type, expression) { - return new CastExpressionSyntax(TypeScript.Syntax.token(80 /* LessThanToken */), type, TypeScript.Syntax.token(81 /* GreaterThanToken */), expression, false); + return new CastExpressionSyntax(TypeScript.Syntax.token(81 /* LessThanToken */), type, TypeScript.Syntax.token(82 /* GreaterThanToken */), expression, false); }; CastExpressionSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -15435,7 +15503,7 @@ var TypeScript; }; ObjectLiteralExpressionSyntax.prototype.kind = function () { - return 214 /* ObjectLiteralExpression */; + return 215 /* ObjectLiteralExpression */; }; ObjectLiteralExpressionSyntax.prototype.childCount = function () { @@ -15476,7 +15544,7 @@ var TypeScript; }; ObjectLiteralExpressionSyntax.create1 = function () { - return new ObjectLiteralExpressionSyntax(TypeScript.Syntax.token(70 /* OpenBraceToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(71 /* CloseBraceToken */), false); + return new ObjectLiteralExpressionSyntax(TypeScript.Syntax.token(71 /* OpenBraceToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(72 /* CloseBraceToken */), false); }; ObjectLiteralExpressionSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -15546,7 +15614,7 @@ var TypeScript; }; SimplePropertyAssignmentSyntax.prototype.kind = function () { - return 238 /* SimplePropertyAssignment */; + return 239 /* SimplePropertyAssignment */; }; SimplePropertyAssignmentSyntax.prototype.childCount = function () { @@ -15575,7 +15643,7 @@ var TypeScript; }; SimplePropertyAssignmentSyntax.create1 = function (propertyName, expression) { - return new SimplePropertyAssignmentSyntax(propertyName, TypeScript.Syntax.token(106 /* ColonToken */), expression, false); + return new SimplePropertyAssignmentSyntax(propertyName, TypeScript.Syntax.token(107 /* ColonToken */), expression, false); }; SimplePropertyAssignmentSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -15620,7 +15688,7 @@ var TypeScript; }; FunctionPropertyAssignmentSyntax.prototype.kind = function () { - return 241 /* FunctionPropertyAssignment */; + return 242 /* FunctionPropertyAssignment */; }; FunctionPropertyAssignmentSyntax.prototype.childCount = function () { @@ -15720,7 +15788,7 @@ var TypeScript; }; GetAccessorPropertyAssignmentSyntax.prototype.kind = function () { - return 239 /* GetAccessorPropertyAssignment */; + return 240 /* GetAccessorPropertyAssignment */; }; GetAccessorPropertyAssignmentSyntax.prototype.childCount = function () { @@ -15759,7 +15827,7 @@ var TypeScript; }; GetAccessorPropertyAssignmentSyntax.create1 = function (propertyName) { - return new GetAccessorPropertyAssignmentSyntax(TypeScript.Syntax.token(64 /* GetKeyword */), propertyName, TypeScript.Syntax.token(72 /* OpenParenToken */), TypeScript.Syntax.token(73 /* CloseParenToken */), null, BlockSyntax.create1(), false); + return new GetAccessorPropertyAssignmentSyntax(TypeScript.Syntax.token(65 /* GetKeyword */), propertyName, TypeScript.Syntax.token(73 /* OpenParenToken */), TypeScript.Syntax.token(74 /* CloseParenToken */), null, BlockSyntax.create1(), false); }; GetAccessorPropertyAssignmentSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -15819,7 +15887,7 @@ var TypeScript; }; SetAccessorPropertyAssignmentSyntax.prototype.kind = function () { - return 240 /* SetAccessorPropertyAssignment */; + return 241 /* SetAccessorPropertyAssignment */; }; SetAccessorPropertyAssignmentSyntax.prototype.childCount = function () { @@ -15854,7 +15922,7 @@ var TypeScript; }; SetAccessorPropertyAssignmentSyntax.create1 = function (propertyName, parameter) { - return new SetAccessorPropertyAssignmentSyntax(TypeScript.Syntax.token(68 /* SetKeyword */), propertyName, TypeScript.Syntax.token(72 /* OpenParenToken */), parameter, TypeScript.Syntax.token(73 /* CloseParenToken */), BlockSyntax.create1(), false); + return new SetAccessorPropertyAssignmentSyntax(TypeScript.Syntax.token(69 /* SetKeyword */), propertyName, TypeScript.Syntax.token(73 /* OpenParenToken */), parameter, TypeScript.Syntax.token(74 /* CloseParenToken */), BlockSyntax.create1(), false); }; SetAccessorPropertyAssignmentSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -15916,7 +15984,7 @@ var TypeScript; }; FunctionExpressionSyntax.prototype.kind = function () { - return 221 /* FunctionExpression */; + return 222 /* FunctionExpression */; }; FunctionExpressionSyntax.prototype.childCount = function () { @@ -16010,7 +16078,7 @@ var TypeScript; }; EmptyStatementSyntax.prototype.kind = function () { - return 155 /* EmptyStatement */; + return 156 /* EmptyStatement */; }; EmptyStatementSyntax.prototype.childCount = function () { @@ -16043,7 +16111,7 @@ var TypeScript; }; EmptyStatementSyntax.create1 = function () { - return new EmptyStatementSyntax(TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new EmptyStatementSyntax(TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; EmptyStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -16079,7 +16147,7 @@ var TypeScript; }; TryStatementSyntax.prototype.kind = function () { - return 158 /* TryStatement */; + return 159 /* TryStatement */; }; TryStatementSyntax.prototype.childCount = function () { @@ -16181,7 +16249,7 @@ var TypeScript; }; CatchClauseSyntax.prototype.kind = function () { - return 234 /* CatchClause */; + return 235 /* CatchClause */; }; CatchClauseSyntax.prototype.childCount = function () { @@ -16220,7 +16288,7 @@ var TypeScript; }; CatchClauseSyntax.create1 = function (identifier) { - return new CatchClauseSyntax(TypeScript.Syntax.token(17 /* CatchKeyword */), TypeScript.Syntax.token(72 /* OpenParenToken */), identifier, null, TypeScript.Syntax.token(73 /* CloseParenToken */), BlockSyntax.create1(), false); + return new CatchClauseSyntax(TypeScript.Syntax.token(17 /* CatchKeyword */), TypeScript.Syntax.token(73 /* OpenParenToken */), identifier, null, TypeScript.Syntax.token(74 /* CloseParenToken */), BlockSyntax.create1(), false); }; CatchClauseSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -16280,7 +16348,7 @@ var TypeScript; }; FinallyClauseSyntax.prototype.kind = function () { - return 235 /* FinallyClause */; + return 236 /* FinallyClause */; }; FinallyClauseSyntax.prototype.childCount = function () { @@ -16349,7 +16417,7 @@ var TypeScript; }; LabeledStatementSyntax.prototype.kind = function () { - return 159 /* LabeledStatement */; + return 160 /* LabeledStatement */; }; LabeledStatementSyntax.prototype.childCount = function () { @@ -16386,7 +16454,7 @@ var TypeScript; }; LabeledStatementSyntax.create1 = function (identifier, statement) { - return new LabeledStatementSyntax(identifier, TypeScript.Syntax.token(106 /* ColonToken */), statement, false); + return new LabeledStatementSyntax(identifier, TypeScript.Syntax.token(107 /* ColonToken */), statement, false); }; LabeledStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -16433,7 +16501,7 @@ var TypeScript; }; DoStatementSyntax.prototype.kind = function () { - return 160 /* DoStatement */; + return 161 /* DoStatement */; }; DoStatementSyntax.prototype.childCount = function () { @@ -16470,7 +16538,7 @@ var TypeScript; }; DoStatementSyntax.create1 = function (statement, condition) { - return new DoStatementSyntax(TypeScript.Syntax.token(22 /* DoKeyword */), statement, TypeScript.Syntax.token(42 /* WhileKeyword */), TypeScript.Syntax.token(72 /* OpenParenToken */), condition, TypeScript.Syntax.token(73 /* CloseParenToken */), TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new DoStatementSyntax(TypeScript.Syntax.token(22 /* DoKeyword */), statement, TypeScript.Syntax.token(42 /* WhileKeyword */), TypeScript.Syntax.token(73 /* OpenParenToken */), condition, TypeScript.Syntax.token(74 /* CloseParenToken */), TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; DoStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -16534,7 +16602,7 @@ var TypeScript; }; TypeOfExpressionSyntax.prototype.kind = function () { - return 170 /* TypeOfExpression */; + return 171 /* TypeOfExpression */; }; TypeOfExpressionSyntax.prototype.childCount = function () { @@ -16610,7 +16678,7 @@ var TypeScript; }; DeleteExpressionSyntax.prototype.kind = function () { - return 169 /* DeleteExpression */; + return 170 /* DeleteExpression */; }; DeleteExpressionSyntax.prototype.childCount = function () { @@ -16686,7 +16754,7 @@ var TypeScript; }; VoidExpressionSyntax.prototype.kind = function () { - return 171 /* VoidExpression */; + return 172 /* VoidExpression */; }; VoidExpressionSyntax.prototype.childCount = function () { @@ -16762,7 +16830,7 @@ var TypeScript; }; DebuggerStatementSyntax.prototype.kind = function () { - return 161 /* DebuggerStatement */; + return 162 /* DebuggerStatement */; }; DebuggerStatementSyntax.prototype.childCount = function () { @@ -16797,7 +16865,7 @@ var TypeScript; }; DebuggerStatementSyntax.create1 = function () { - return new DebuggerStatementSyntax(TypeScript.Syntax.token(19 /* DebuggerKeyword */), TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new DebuggerStatementSyntax(TypeScript.Syntax.token(19 /* DebuggerKeyword */), TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; DebuggerStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -16889,7 +16957,7 @@ var TypeScript; }; SyntaxRewriter.prototype.visitExternalModuleReference = function (node) { - return node.update(this.visitToken(node.requireKeyword), this.visitToken(node.openParenToken), this.visitToken(node.stringLiteral), this.visitToken(node.closeParenToken)); + return node.update(this.visitToken(node.moduleOrRequireKeyword), this.visitToken(node.openParenToken), this.visitToken(node.stringLiteral), this.visitToken(node.closeParenToken)); }; SyntaxRewriter.prototype.visitModuleNameModuleReference = function (node) { @@ -19709,11 +19777,11 @@ var TypeScript; SyntaxUtilities.isAngleBracket = function (positionedElement) { var element = positionedElement.element(); var parent = positionedElement.parentElement(); - if (parent !== null && (element.kind() === 80 /* LessThanToken */ || element.kind() === 81 /* GreaterThanToken */)) { + if (parent !== null && (element.kind() === 81 /* LessThanToken */ || element.kind() === 82 /* GreaterThanToken */)) { switch (parent.kind()) { - case 227 /* TypeArgumentList */: - case 228 /* TypeParameterList */: - case 219 /* CastExpression */: + case 228 /* TypeArgumentList */: + case 229 /* TypeParameterList */: + case 220 /* CastExpression */: return true; } } @@ -19742,13 +19810,13 @@ var TypeScript; SyntaxUtilities.getExportKeyword = function (moduleElement) { switch (moduleElement.kind()) { - case 130 /* ModuleDeclaration */: - case 131 /* ClassDeclaration */: - case 129 /* FunctionDeclaration */: - case 147 /* VariableStatement */: - case 132 /* EnumDeclaration */: - case 128 /* InterfaceDeclaration */: - case 133 /* ImportDeclaration */: + case 131 /* ModuleDeclaration */: + case 132 /* ClassDeclaration */: + case 130 /* FunctionDeclaration */: + case 148 /* VariableStatement */: + case 133 /* EnumDeclaration */: + case 129 /* InterfaceDeclaration */: + case 134 /* ImportDeclaration */: return SyntaxUtilities.getToken((moduleElement).modifiers, 47 /* ExportKeyword */); default: return null; @@ -19762,26 +19830,26 @@ var TypeScript; var node = positionNode.node(); switch (node.kind()) { - case 130 /* ModuleDeclaration */: - case 131 /* ClassDeclaration */: - case 129 /* FunctionDeclaration */: - case 147 /* VariableStatement */: - case 132 /* EnumDeclaration */: - if (SyntaxUtilities.containsToken((node).modifiers, 63 /* DeclareKeyword */)) { + case 131 /* ModuleDeclaration */: + case 132 /* ClassDeclaration */: + case 130 /* FunctionDeclaration */: + case 148 /* VariableStatement */: + case 133 /* EnumDeclaration */: + if (SyntaxUtilities.containsToken((node).modifiers, 64 /* DeclareKeyword */)) { return true; } - case 133 /* ImportDeclaration */: - case 137 /* ConstructorDeclaration */: - case 135 /* MemberFunctionDeclaration */: - case 138 /* GetMemberAccessorDeclaration */: - case 139 /* SetMemberAccessorDeclaration */: - case 136 /* MemberVariableDeclaration */: + case 134 /* ImportDeclaration */: + case 138 /* ConstructorDeclaration */: + case 136 /* MemberFunctionDeclaration */: + case 139 /* GetMemberAccessorDeclaration */: + case 140 /* SetMemberAccessorDeclaration */: + case 137 /* MemberVariableDeclaration */: if (node.isClassElement() || node.isModuleElement()) { return SyntaxUtilities.isAmbientDeclarationSyntax(positionNode.containingNode()); } - case 243 /* EnumElement */: + case 244 /* EnumElement */: return SyntaxUtilities.isAmbientDeclarationSyntax(positionNode.containingNode().containingNode()); default: @@ -20215,7 +20283,7 @@ var TypeScript; }; SyntaxWalker.prototype.visitExternalModuleReference = function (node) { - this.visitToken(node.requireKeyword); + this.visitToken(node.moduleOrRequireKeyword); this.visitToken(node.openParenToken); this.visitToken(node.stringLiteral); this.visitToken(node.closeParenToken); @@ -21627,7 +21695,7 @@ var TypeScript; return !this.isInStrictMode; } - return tokenKind <= 69 /* LastTypeScriptKeyword */; + return tokenKind <= 70 /* LastTypeScriptKeyword */; } return false; @@ -21671,7 +21739,7 @@ var TypeScript; return true; } - if (token.tokenKind === 71 /* CloseBraceToken */) { + if (token.tokenKind === 72 /* CloseBraceToken */) { return true; } @@ -21689,7 +21757,7 @@ var TypeScript; ParserImpl.prototype.canEatExplicitOrAutomaticSemicolon = function (allowWithoutNewline) { var token = this.currentToken(); - if (token.tokenKind === 78 /* SemicolonToken */) { + if (token.tokenKind === 79 /* SemicolonToken */) { return true; } @@ -21699,12 +21767,12 @@ var TypeScript; ParserImpl.prototype.eatExplicitOrAutomaticSemicolon = function (allowWithoutNewline) { var token = this.currentToken(); - if (token.tokenKind === 78 /* SemicolonToken */) { - return this.eatToken(78 /* SemicolonToken */); + if (token.tokenKind === 79 /* SemicolonToken */) { + return this.eatToken(79 /* SemicolonToken */); } if (this.canEatAutomaticSemicolon(allowWithoutNewline)) { - var semicolonToken = TypeScript.Syntax.emptyToken(78 /* SemicolonToken */); + var semicolonToken = TypeScript.Syntax.emptyToken(79 /* SemicolonToken */); if (!this.parseOptions.allowAutomaticSemicolonInsertion()) { this.addDiagnostic(new TypeScript.Diagnostic(this.fileName, this.previousTokenEnd(), 0, TypeScript.DiagnosticCode.Automatic_semicolon_insertion_not_allowed, null)); @@ -21713,7 +21781,7 @@ var TypeScript; return semicolonToken; } - return this.eatToken(78 /* SemicolonToken */); + return this.eatToken(79 /* SemicolonToken */); }; ParserImpl.prototype.isKeyword = function (kind) { @@ -21753,78 +21821,78 @@ var TypeScript; ParserImpl.getPrecedence = function (expressionKind) { switch (expressionKind) { - case 172 /* CommaExpression */: + case 173 /* CommaExpression */: return 1 /* CommaExpressionPrecedence */; - case 173 /* AssignmentExpression */: - case 174 /* AddAssignmentExpression */: - case 175 /* SubtractAssignmentExpression */: - case 176 /* MultiplyAssignmentExpression */: - case 177 /* DivideAssignmentExpression */: - case 178 /* ModuloAssignmentExpression */: - case 179 /* AndAssignmentExpression */: - case 180 /* ExclusiveOrAssignmentExpression */: - case 181 /* OrAssignmentExpression */: - case 182 /* LeftShiftAssignmentExpression */: - case 183 /* SignedRightShiftAssignmentExpression */: - case 184 /* UnsignedRightShiftAssignmentExpression */: + case 174 /* AssignmentExpression */: + case 175 /* AddAssignmentExpression */: + case 176 /* SubtractAssignmentExpression */: + case 177 /* MultiplyAssignmentExpression */: + case 178 /* DivideAssignmentExpression */: + case 179 /* ModuloAssignmentExpression */: + case 180 /* AndAssignmentExpression */: + case 181 /* ExclusiveOrAssignmentExpression */: + case 182 /* OrAssignmentExpression */: + case 183 /* LeftShiftAssignmentExpression */: + case 184 /* SignedRightShiftAssignmentExpression */: + case 185 /* UnsignedRightShiftAssignmentExpression */: return 2 /* AssignmentExpressionPrecedence */; - case 185 /* ConditionalExpression */: + case 186 /* ConditionalExpression */: return 3 /* ConditionalExpressionPrecedence */; - case 186 /* LogicalOrExpression */: + case 187 /* LogicalOrExpression */: return 5 /* LogicalOrExpressionPrecedence */; - case 187 /* LogicalAndExpression */: + case 188 /* LogicalAndExpression */: return 6 /* LogicalAndExpressionPrecedence */; - case 188 /* BitwiseOrExpression */: + case 189 /* BitwiseOrExpression */: return 7 /* BitwiseOrExpressionPrecedence */; - case 189 /* BitwiseExclusiveOrExpression */: + case 190 /* BitwiseExclusiveOrExpression */: return 8 /* BitwiseExclusiveOrExpressionPrecedence */; - case 190 /* BitwiseAndExpression */: + case 191 /* BitwiseAndExpression */: return 9 /* BitwiseAndExpressionPrecedence */; - case 191 /* EqualsWithTypeConversionExpression */: - case 192 /* NotEqualsWithTypeConversionExpression */: - case 193 /* EqualsExpression */: - case 194 /* NotEqualsExpression */: + case 192 /* EqualsWithTypeConversionExpression */: + case 193 /* NotEqualsWithTypeConversionExpression */: + case 194 /* EqualsExpression */: + case 195 /* NotEqualsExpression */: return 10 /* EqualityExpressionPrecedence */; - case 195 /* LessThanExpression */: - case 196 /* GreaterThanExpression */: - case 197 /* LessThanOrEqualExpression */: - case 198 /* GreaterThanOrEqualExpression */: - case 199 /* InstanceOfExpression */: - case 200 /* InExpression */: + case 196 /* LessThanExpression */: + case 197 /* GreaterThanExpression */: + case 198 /* LessThanOrEqualExpression */: + case 199 /* GreaterThanOrEqualExpression */: + case 200 /* InstanceOfExpression */: + case 201 /* InExpression */: return 11 /* RelationalExpressionPrecedence */; - case 201 /* LeftShiftExpression */: - case 202 /* SignedRightShiftExpression */: - case 203 /* UnsignedRightShiftExpression */: + case 202 /* LeftShiftExpression */: + case 203 /* SignedRightShiftExpression */: + case 204 /* UnsignedRightShiftExpression */: return 12 /* ShiftExpressionPrecdence */; - case 207 /* AddExpression */: - case 208 /* SubtractExpression */: + case 208 /* AddExpression */: + case 209 /* SubtractExpression */: return 13 /* AdditiveExpressionPrecedence */; - case 204 /* MultiplyExpression */: - case 205 /* DivideExpression */: - case 206 /* ModuloExpression */: + case 205 /* MultiplyExpression */: + case 206 /* DivideExpression */: + case 207 /* ModuloExpression */: return 14 /* MultiplicativeExpressionPrecedence */; - case 163 /* PlusExpression */: - case 164 /* NegateExpression */: - case 165 /* BitwiseNotExpression */: - case 166 /* LogicalNotExpression */: - case 169 /* DeleteExpression */: - case 170 /* TypeOfExpression */: - case 171 /* VoidExpression */: - case 167 /* PreIncrementExpression */: - case 168 /* PreDecrementExpression */: + case 164 /* PlusExpression */: + case 165 /* NegateExpression */: + case 166 /* BitwiseNotExpression */: + case 167 /* LogicalNotExpression */: + case 170 /* DeleteExpression */: + case 171 /* TypeOfExpression */: + case 172 /* VoidExpression */: + case 168 /* PreIncrementExpression */: + case 169 /* PreDecrementExpression */: return 15 /* UnaryExpressionPrecedence */; } @@ -21998,7 +22066,7 @@ var TypeScript; var modifiers = this.parseModifiers(); var importKeyword = this.eatKeyword(49 /* ImportKeyword */); var identifier = this.eatIdentifierToken(); - var equalsToken = this.eatToken(107 /* EqualsToken */); + var equalsToken = this.eatToken(108 /* EqualsToken */); var moduleReference = this.parseModuleReference(); var semicolonToken = this.eatExplicitOrAutomaticSemicolon(false); @@ -22006,12 +22074,12 @@ var TypeScript; }; ParserImpl.prototype.isExportAssignment = function () { - return this.currentToken().tokenKind === 47 /* ExportKeyword */ && this.peekToken(1).tokenKind === 107 /* EqualsToken */; + return this.currentToken().tokenKind === 47 /* ExportKeyword */ && this.peekToken(1).tokenKind === 108 /* EqualsToken */; }; ParserImpl.prototype.parseExportAssignment = function () { var exportKeyword = this.eatKeyword(47 /* ExportKeyword */); - var equalsToken = this.eatToken(107 /* EqualsToken */); + var equalsToken = this.eatToken(108 /* EqualsToken */); var identifier = this.eatIdentifierToken(); var semicolonToken = this.eatExplicitOrAutomaticSemicolon(false); @@ -22028,20 +22096,20 @@ var TypeScript; ParserImpl.prototype.isExternalModuleReference = function () { var token0 = this.currentToken(); - if (token0.tokenKind === 66 /* RequireKeyword */) { - return this.peekToken(1).tokenKind === 72 /* OpenParenToken */; + if (token0.tokenKind === 66 /* ModuleKeyword */ || token0.tokenKind === 67 /* RequireKeyword */) { + return this.peekToken(1).tokenKind === 73 /* OpenParenToken */; } return false; }; ParserImpl.prototype.parseExternalModuleReference = function () { - var requireKeyword = this.eatKeyword(66 /* RequireKeyword */); - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var moduleOrRequireKeyword = this.eatAnyToken(); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var stringLiteral = this.eatToken(14 /* StringLiteral */); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); - return this.factory.externalModuleReference(requireKeyword, openParenToken, stringLiteral, closeParenToken); + return this.factory.externalModuleReference(moduleOrRequireKeyword, openParenToken, stringLiteral, closeParenToken); }; ParserImpl.prototype.parseModuleNameModuleReference = function () { @@ -22059,7 +22127,7 @@ var TypeScript; }; ParserImpl.prototype.tryParseTypeArgumentList = function (inExpression) { - if (this.currentToken().kind() !== 80 /* LessThanToken */) { + if (this.currentToken().kind() !== 81 /* LessThanToken */) { return null; } @@ -22069,26 +22137,26 @@ var TypeScript; var typeArguments; if (!inExpression) { - lessThanToken = this.eatToken(80 /* LessThanToken */); + lessThanToken = this.eatToken(81 /* LessThanToken */); result = this.parseSeparatedSyntaxList(262144 /* TypeArgumentList_Types */); typeArguments = result.list; lessThanToken = this.addSkippedTokensAfterToken(lessThanToken, result.skippedTokens); - greaterThanToken = this.eatToken(81 /* GreaterThanToken */); + greaterThanToken = this.eatToken(82 /* GreaterThanToken */); return this.factory.typeArgumentList(lessThanToken, typeArguments, greaterThanToken); } var rewindPoint = this.getRewindPoint(); try { - lessThanToken = this.eatToken(80 /* LessThanToken */); + lessThanToken = this.eatToken(81 /* LessThanToken */); result = this.parseSeparatedSyntaxList(262144 /* TypeArgumentList_Types */); typeArguments = result.list; lessThanToken = this.addSkippedTokensAfterToken(lessThanToken, result.skippedTokens); - greaterThanToken = this.eatToken(81 /* GreaterThanToken */); + greaterThanToken = this.eatToken(82 /* GreaterThanToken */); if (greaterThanToken.fullWidth() === 0 || !this.canFollowTypeArgumentListInExpression(this.currentToken().kind())) { this.rewind(rewindPoint); @@ -22103,25 +22171,25 @@ var TypeScript; ParserImpl.prototype.canFollowTypeArgumentListInExpression = function (kind) { switch (kind) { - case 72 /* OpenParenToken */: - case 76 /* DotToken */: + case 73 /* OpenParenToken */: + case 77 /* DotToken */: - case 73 /* CloseParenToken */: - case 75 /* CloseBracketToken */: - case 106 /* ColonToken */: - case 78 /* SemicolonToken */: - case 79 /* CommaToken */: - case 105 /* QuestionToken */: - case 84 /* EqualsEqualsToken */: - case 87 /* EqualsEqualsEqualsToken */: - case 86 /* ExclamationEqualsToken */: - case 88 /* ExclamationEqualsEqualsToken */: - case 103 /* AmpersandAmpersandToken */: - case 104 /* BarBarToken */: - case 100 /* CaretToken */: - case 98 /* AmpersandToken */: - case 99 /* BarToken */: - case 71 /* CloseBraceToken */: + case 74 /* CloseParenToken */: + case 76 /* CloseBracketToken */: + case 107 /* ColonToken */: + case 79 /* SemicolonToken */: + case 80 /* CommaToken */: + case 106 /* QuestionToken */: + case 85 /* EqualsEqualsToken */: + case 88 /* EqualsEqualsEqualsToken */: + case 87 /* ExclamationEqualsToken */: + case 89 /* ExclamationEqualsEqualsToken */: + case 104 /* AmpersandAmpersandToken */: + case 105 /* BarBarToken */: + case 101 /* CaretToken */: + case 99 /* AmpersandToken */: + case 100 /* BarToken */: + case 72 /* CloseBraceToken */: case 10 /* EndOfFileToken */: return true; @@ -22134,8 +22202,8 @@ var TypeScript; var shouldContinue = this.isIdentifier(this.currentToken()); var current = this.eatIdentifierToken(); - while (shouldContinue && this.currentToken().tokenKind === 76 /* DotToken */) { - var dotToken = this.eatToken(76 /* DotToken */); + while (shouldContinue && this.currentToken().tokenKind === 77 /* DotToken */) { + var dotToken = this.eatToken(77 /* DotToken */); var currentToken = this.currentToken(); var identifierName; @@ -22169,7 +22237,7 @@ var TypeScript; var enumKeyword = this.eatKeyword(46 /* EnumKeyword */); var identifier = this.eatIdentifierToken(); - var openBraceToken = this.eatToken(70 /* OpenBraceToken */); + var openBraceToken = this.eatToken(71 /* OpenBraceToken */); var enumElements = TypeScript.Syntax.emptySeparatedList; if (openBraceToken.width() > 0) { @@ -22178,13 +22246,13 @@ var TypeScript; openBraceToken = this.addSkippedTokensAfterToken(openBraceToken, result.skippedTokens); } - var closeBraceToken = this.eatToken(71 /* CloseBraceToken */); + var closeBraceToken = this.eatToken(72 /* CloseBraceToken */); return this.factory.enumDeclaration(modifiers, enumKeyword, identifier, openBraceToken, enumElements, closeBraceToken); }; ParserImpl.prototype.isEnumElement = function (inErrorRecovery) { - if (this.currentNode() !== null && this.currentNode().kind() === 243 /* EnumElement */) { + if (this.currentNode() !== null && this.currentNode().kind() === 244 /* EnumElement */) { return true; } @@ -22192,7 +22260,7 @@ var TypeScript; }; ParserImpl.prototype.parseEnumElement = function () { - if (this.currentNode() !== null && this.currentNode().kind() === 243 /* EnumElement */) { + if (this.currentNode() !== null && this.currentNode().kind() === 244 /* EnumElement */) { return this.eatNode(); } @@ -22211,7 +22279,7 @@ var TypeScript; case 55 /* PrivateKeyword */: case 58 /* StaticKeyword */: case 47 /* ExportKeyword */: - case 63 /* DeclareKeyword */: + case 64 /* DeclareKeyword */: return true; default: @@ -22281,7 +22349,7 @@ var TypeScript; var identifier = this.eatIdentifierToken(); var typeParameterList = this.parseOptionalTypeParameterList(false); var heritageClauses = this.parseHeritageClauses(); - var openBraceToken = this.eatToken(70 /* OpenBraceToken */); + var openBraceToken = this.eatToken(71 /* OpenBraceToken */); var classElements = TypeScript.Syntax.emptyList; if (openBraceToken.width() > 0) { @@ -22291,12 +22359,12 @@ var TypeScript; openBraceToken = this.addSkippedTokensAfterToken(openBraceToken, result.skippedTokens); } - var closeBraceToken = this.eatToken(71 /* CloseBraceToken */); + var closeBraceToken = this.eatToken(72 /* CloseBraceToken */); return this.factory.classDeclaration(modifiers, classKeyword, identifier, typeParameterList, heritageClauses, openBraceToken, classElements, closeBraceToken); }; ParserImpl.prototype.isConstructorDeclaration = function () { - return this.currentToken().tokenKind === 62 /* ConstructorKeyword */; + return this.currentToken().tokenKind === 63 /* ConstructorKeyword */; }; ParserImpl.isPublicOrPrivateKeyword = function (token) { @@ -22306,7 +22374,7 @@ var TypeScript; ParserImpl.prototype.isMemberAccessorDeclaration = function (inErrorRecovery) { var index = this.modifierCount(); - if (this.peekToken(index).tokenKind !== 64 /* GetKeyword */ && this.peekToken(index).tokenKind !== 68 /* SetKeyword */) { + if (this.peekToken(index).tokenKind !== 65 /* GetKeyword */ && this.peekToken(index).tokenKind !== 69 /* SetKeyword */) { return false; } @@ -22317,9 +22385,9 @@ var TypeScript; ParserImpl.prototype.parseMemberAccessorDeclaration = function () { var modifiers = this.parseModifiers(); - if (this.currentToken().tokenKind === 64 /* GetKeyword */) { + if (this.currentToken().tokenKind === 65 /* GetKeyword */) { return this.parseGetMemberAccessorDeclaration(modifiers); - } else if (this.currentToken().tokenKind === 68 /* SetKeyword */) { + } else if (this.currentToken().tokenKind === 69 /* SetKeyword */) { return this.parseSetMemberAccessorDeclaration(modifiers); } else { throw TypeScript.Errors.invalidOperation(); @@ -22327,7 +22395,7 @@ var TypeScript; }; ParserImpl.prototype.parseGetMemberAccessorDeclaration = function (modifiers) { - var getKeyword = this.eatKeyword(64 /* GetKeyword */); + var getKeyword = this.eatKeyword(65 /* GetKeyword */); var propertyName = this.eatPropertyName(); var parameterList = this.parseParameterList(); var typeAnnotation = this.parseOptionalTypeAnnotation(false); @@ -22337,7 +22405,7 @@ var TypeScript; }; ParserImpl.prototype.parseSetMemberAccessorDeclaration = function (modifiers) { - var setKeyword = this.eatKeyword(68 /* SetKeyword */); + var setKeyword = this.eatKeyword(69 /* SetKeyword */); var propertyName = this.eatPropertyName(); var parameterList = this.parseParameterList(); var block = this.parseBlock(false, false); @@ -22354,7 +22422,7 @@ var TypeScript; }; ParserImpl.prototype.parseConstructorDeclaration = function () { - var constructorKeyword = this.eatKeyword(62 /* ConstructorKeyword */); + var constructorKeyword = this.eatKeyword(63 /* ConstructorKeyword */); var parameterList = this.parseParameterList(); var semicolonToken = null; @@ -22425,10 +22493,10 @@ var TypeScript; ParserImpl.prototype.isDefinitelyMemberVariablePropertyName = function (index) { if (TypeScript.SyntaxFacts.isAnyKeyword(this.peekToken(index).tokenKind)) { switch (this.peekToken(index + 1).tokenKind) { - case 78 /* SemicolonToken */: - case 107 /* EqualsToken */: - case 106 /* ColonToken */: - case 71 /* CloseBraceToken */: + case 79 /* SemicolonToken */: + case 108 /* EqualsToken */: + case 107 /* ColonToken */: + case 72 /* CloseBraceToken */: case 10 /* EndOfFileToken */: return true; default: @@ -22502,9 +22570,9 @@ var TypeScript; ParserImpl.prototype.tryAddUnexpectedEqualsGreaterThanToken = function (callSignature) { var token0 = this.currentToken(); - var hasEqualsGreaterThanToken = token0.tokenKind === 85 /* EqualsGreaterThanToken */; + var hasEqualsGreaterThanToken = token0.tokenKind === 86 /* EqualsGreaterThanToken */; if (hasEqualsGreaterThanToken) { - var diagnostic = new TypeScript.Diagnostic(this.fileName, this.currentTokenStart(), token0.width(), TypeScript.DiagnosticCode.Unexpected_token_0_expected, [TypeScript.SyntaxFacts.getText(70 /* OpenBraceToken */)]); + var diagnostic = new TypeScript.Diagnostic(this.fileName, this.currentTokenStart(), token0.width(), TypeScript.DiagnosticCode.Unexpected_token_0_expected, [TypeScript.SyntaxFacts.getText(71 /* OpenBraceToken */)]); this.addDiagnostic(diagnostic); var token = this.eatAnyToken(); @@ -22544,11 +22612,11 @@ var TypeScript; ParserImpl.prototype.isModuleDeclaration = function () { var index = this.modifierCount(); - if (index > 0 && this.peekToken(index).tokenKind === 65 /* ModuleKeyword */) { + if (index > 0 && this.peekToken(index).tokenKind === 66 /* ModuleKeyword */) { return true; } - if (this.currentToken().tokenKind === 65 /* ModuleKeyword */) { + if (this.currentToken().tokenKind === 66 /* ModuleKeyword */) { var token1 = this.peekToken(1); return this.isIdentifier(token1) || token1.tokenKind === 14 /* StringLiteral */; } @@ -22558,7 +22626,7 @@ var TypeScript; ParserImpl.prototype.parseModuleDeclaration = function () { var modifiers = this.parseModifiers(); - var moduleKeyword = this.eatKeyword(65 /* ModuleKeyword */); + var moduleKeyword = this.eatKeyword(66 /* ModuleKeyword */); var moduleName = null; var stringLiteral = null; @@ -22569,7 +22637,7 @@ var TypeScript; moduleName = this.parseName(); } - var openBraceToken = this.eatToken(70 /* OpenBraceToken */); + var openBraceToken = this.eatToken(71 /* OpenBraceToken */); var moduleElements = TypeScript.Syntax.emptyList; if (openBraceToken.width() > 0) { @@ -22578,7 +22646,7 @@ var TypeScript; openBraceToken = this.addSkippedTokensAfterToken(openBraceToken, result.skippedTokens); } - var closeBraceToken = this.eatToken(71 /* CloseBraceToken */); + var closeBraceToken = this.eatToken(72 /* CloseBraceToken */); return this.factory.moduleDeclaration(modifiers, moduleKeyword, moduleName, stringLiteral, openBraceToken, moduleElements, closeBraceToken); }; @@ -22605,7 +22673,7 @@ var TypeScript; }; ParserImpl.prototype.parseObjectType = function () { - var openBraceToken = this.eatToken(70 /* OpenBraceToken */); + var openBraceToken = this.eatToken(71 /* OpenBraceToken */); var typeMembers = TypeScript.Syntax.emptySeparatedList; if (openBraceToken.width() > 0) { @@ -22614,7 +22682,7 @@ var TypeScript; openBraceToken = this.addSkippedTokensAfterToken(openBraceToken, result.skippedTokens); } - var closeBraceToken = this.eatToken(71 /* CloseBraceToken */); + var closeBraceToken = this.eatToken(72 /* CloseBraceToken */); return this.factory.objectType(openBraceToken, typeMembers, closeBraceToken); }; @@ -22654,9 +22722,9 @@ var TypeScript; }; ParserImpl.prototype.parseIndexSignature = function () { - var openBracketToken = this.eatToken(74 /* OpenBracketToken */); + var openBracketToken = this.eatToken(75 /* OpenBracketToken */); var parameter = this.parseParameter(); - var closeBracketToken = this.eatToken(75 /* CloseBracketToken */); + var closeBracketToken = this.eatToken(76 /* CloseBracketToken */); var typeAnnotation = this.parseOptionalTypeAnnotation(false); return this.factory.indexSignature(openBracketToken, parameter, closeBracketToken, typeAnnotation); @@ -22664,7 +22732,7 @@ var TypeScript; ParserImpl.prototype.parseMethodSignature = function () { var propertyName = this.eatPropertyName(); - var questionToken = this.tryEatToken(105 /* QuestionToken */); + var questionToken = this.tryEatToken(106 /* QuestionToken */); var callSignature = this.parseCallSignature(false); return this.factory.methodSignature(propertyName, questionToken, callSignature); @@ -22672,7 +22740,7 @@ var TypeScript; ParserImpl.prototype.parsePropertySignature = function () { var propertyName = this.eatPropertyName(); - var questionToken = this.tryEatToken(105 /* QuestionToken */); + var questionToken = this.tryEatToken(106 /* QuestionToken */); var typeAnnotation = this.parseOptionalTypeAnnotation(false); return this.factory.propertySignature(propertyName, questionToken, typeAnnotation); @@ -22680,7 +22748,7 @@ var TypeScript; ParserImpl.prototype.isCallSignature = function (tokenIndex) { var tokenKind = this.peekToken(tokenIndex).tokenKind; - return tokenKind === 72 /* OpenParenToken */ || tokenKind === 80 /* LessThanToken */; + return tokenKind === 73 /* OpenParenToken */ || tokenKind === 81 /* LessThanToken */; }; ParserImpl.prototype.isConstructSignature = function () { @@ -22689,11 +22757,11 @@ var TypeScript; } var token1 = this.peekToken(1); - return token1.tokenKind === 80 /* LessThanToken */ || token1.tokenKind === 72 /* OpenParenToken */; + return token1.tokenKind === 81 /* LessThanToken */ || token1.tokenKind === 73 /* OpenParenToken */; }; ParserImpl.prototype.isIndexSignature = function () { - return this.currentToken().tokenKind === 74 /* OpenBracketToken */; + return this.currentToken().tokenKind === 75 /* OpenBracketToken */; }; ParserImpl.prototype.isMethodSignature = function (inErrorRecovery) { @@ -22702,7 +22770,7 @@ var TypeScript; return true; } - if (this.peekToken(1).tokenKind === 105 /* QuestionToken */ && this.isCallSignature(2)) { + if (this.peekToken(1).tokenKind === 106 /* QuestionToken */ && this.isCallSignature(2)) { return true; } } @@ -22833,9 +22901,9 @@ var TypeScript; var doKeyword = this.eatKeyword(22 /* DoKeyword */); var statement = this.parseStatement(); var whileKeyword = this.eatKeyword(42 /* WhileKeyword */); - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var condition = this.parseExpression(true); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); var semicolonToken = this.eatExplicitOrAutomaticSemicolon(true); @@ -22843,12 +22911,12 @@ var TypeScript; }; ParserImpl.prototype.isLabeledStatement = function () { - return this.isIdentifier(this.currentToken()) && this.peekToken(1).tokenKind === 106 /* ColonToken */; + return this.isIdentifier(this.currentToken()) && this.peekToken(1).tokenKind === 107 /* ColonToken */; }; ParserImpl.prototype.parseLabeledStatement = function () { var identifier = this.eatIdentifierToken(); - var colonToken = this.eatToken(106 /* ColonToken */); + var colonToken = this.eatToken(107 /* ColonToken */); var statement = this.parseStatement(); return this.factory.labeledStatement(identifier, colonToken, statement); @@ -22885,10 +22953,10 @@ var TypeScript; ParserImpl.prototype.parseCatchClause = function () { var catchKeyword = this.eatKeyword(17 /* CatchKeyword */); - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var identifier = this.eatIdentifierToken(); var typeAnnotation = this.parseOptionalTypeAnnotation(false); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); var savedListParsingState = this.listParsingState; this.listParsingState |= 128 /* CatchBlock_Statements */; @@ -22915,9 +22983,9 @@ var TypeScript; ParserImpl.prototype.parseWithStatement = function () { var withKeyword = this.eatKeyword(43 /* WithKeyword */); - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var condition = this.parseExpression(true); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); var statement = this.parseStatement(); return this.factory.withStatement(withKeyword, openParenToken, condition, closeParenToken, statement); @@ -22929,9 +22997,9 @@ var TypeScript; ParserImpl.prototype.parseWhileStatement = function () { var whileKeyword = this.eatKeyword(42 /* WhileKeyword */); - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var condition = this.parseExpression(true); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); var statement = this.parseStatement(); return this.factory.whileStatement(whileKeyword, openParenToken, condition, closeParenToken, statement); @@ -22942,11 +23010,11 @@ var TypeScript; return false; } - return this.currentToken().tokenKind === 78 /* SemicolonToken */; + return this.currentToken().tokenKind === 79 /* SemicolonToken */; }; ParserImpl.prototype.parseEmptyStatement = function () { - var semicolonToken = this.eatToken(78 /* SemicolonToken */); + var semicolonToken = this.eatToken(79 /* SemicolonToken */); return this.factory.emptyStatement(semicolonToken); }; @@ -22956,12 +23024,12 @@ var TypeScript; ParserImpl.prototype.parseForOrForInStatement = function () { var forKeyword = this.eatKeyword(26 /* ForKeyword */); - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var currentToken = this.currentToken(); if (currentToken.tokenKind === 40 /* VarKeyword */) { return this.parseForOrForInStatementWithVariableDeclaration(forKeyword, openParenToken); - } else if (currentToken.tokenKind === 78 /* SemicolonToken */) { + } else if (currentToken.tokenKind === 79 /* SemicolonToken */) { return this.parseForStatement(forKeyword, openParenToken); } else { return this.parseForOrForInStatementWithInitializer(forKeyword, openParenToken); @@ -22981,7 +23049,7 @@ var TypeScript; ParserImpl.prototype.parseForInStatementWithVariableDeclarationOrInitializer = function (forKeyword, openParenToken, variableDeclaration, initializer) { var inKeyword = this.eatKeyword(29 /* InKeyword */); var expression = this.parseExpression(true); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); var statement = this.parseStatement(); return this.factory.forInStatement(forKeyword, openParenToken, variableDeclaration, initializer, inKeyword, expression, closeParenToken, statement); @@ -22999,7 +23067,7 @@ var TypeScript; ParserImpl.prototype.parseForStatement = function (forKeyword, openParenToken) { var initializer = null; - if (this.currentToken().tokenKind !== 78 /* SemicolonToken */ && this.currentToken().tokenKind !== 73 /* CloseParenToken */ && this.currentToken().tokenKind !== 10 /* EndOfFileToken */) { + if (this.currentToken().tokenKind !== 79 /* SemicolonToken */ && this.currentToken().tokenKind !== 74 /* CloseParenToken */ && this.currentToken().tokenKind !== 10 /* EndOfFileToken */) { initializer = this.parseExpression(false); } @@ -23007,21 +23075,21 @@ var TypeScript; }; ParserImpl.prototype.parseForStatementWithVariableDeclarationOrInitializer = function (forKeyword, openParenToken, variableDeclaration, initializer) { - var firstSemicolonToken = this.eatToken(78 /* SemicolonToken */); + var firstSemicolonToken = this.eatToken(79 /* SemicolonToken */); var condition = null; - if (this.currentToken().tokenKind !== 78 /* SemicolonToken */ && this.currentToken().tokenKind !== 73 /* CloseParenToken */ && this.currentToken().tokenKind !== 10 /* EndOfFileToken */) { + if (this.currentToken().tokenKind !== 79 /* SemicolonToken */ && this.currentToken().tokenKind !== 74 /* CloseParenToken */ && this.currentToken().tokenKind !== 10 /* EndOfFileToken */) { condition = this.parseExpression(true); } - var secondSemicolonToken = this.eatToken(78 /* SemicolonToken */); + var secondSemicolonToken = this.eatToken(79 /* SemicolonToken */); var incrementor = null; - if (this.currentToken().tokenKind !== 73 /* CloseParenToken */ && this.currentToken().tokenKind !== 10 /* EndOfFileToken */) { + if (this.currentToken().tokenKind !== 74 /* CloseParenToken */ && this.currentToken().tokenKind !== 10 /* EndOfFileToken */) { incrementor = this.parseExpression(true); } - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); var statement = this.parseStatement(); return this.factory.forStatement(forKeyword, openParenToken, variableDeclaration, initializer, firstSemicolonToken, condition, secondSemicolonToken, incrementor, closeParenToken, statement); @@ -23069,11 +23137,11 @@ var TypeScript; ParserImpl.prototype.parseSwitchStatement = function () { var switchKeyword = this.eatKeyword(34 /* SwitchKeyword */); - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var expression = this.parseExpression(true); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); - var openBraceToken = this.eatToken(70 /* OpenBraceToken */); + var openBraceToken = this.eatToken(71 /* OpenBraceToken */); var switchClauses = TypeScript.Syntax.emptyList; if (openBraceToken.width() > 0) { @@ -23082,7 +23150,7 @@ var TypeScript; openBraceToken = this.addSkippedTokensAfterToken(openBraceToken, result.skippedTokens); } - var closeBraceToken = this.eatToken(71 /* CloseBraceToken */); + var closeBraceToken = this.eatToken(72 /* CloseBraceToken */); return this.factory.switchStatement(switchKeyword, openParenToken, expression, closeParenToken, openBraceToken, switchClauses, closeBraceToken); }; @@ -23119,7 +23187,7 @@ var TypeScript; ParserImpl.prototype.parseCaseSwitchClause = function () { var caseKeyword = this.eatKeyword(16 /* CaseKeyword */); var expression = this.parseExpression(true); - var colonToken = this.eatToken(106 /* ColonToken */); + var colonToken = this.eatToken(107 /* ColonToken */); var statements = TypeScript.Syntax.emptyList; if (colonToken.fullWidth() > 0) { @@ -23133,7 +23201,7 @@ var TypeScript; ParserImpl.prototype.parseDefaultSwitchClause = function () { var defaultKeyword = this.eatKeyword(20 /* DefaultKeyword */); - var colonToken = this.eatToken(106 /* ColonToken */); + var colonToken = this.eatToken(107 /* ColonToken */); var statements = TypeScript.Syntax.emptyList; if (colonToken.fullWidth() > 0) { @@ -23186,7 +23254,7 @@ var TypeScript; var currentToken = this.currentToken(); var kind = currentToken.tokenKind; - if (kind === 70 /* OpenBraceToken */ || kind === 27 /* FunctionKeyword */) { + if (kind === 71 /* OpenBraceToken */ || kind === 27 /* FunctionKeyword */) { return false; } @@ -23194,7 +23262,7 @@ var TypeScript; }; ParserImpl.prototype.isAssignmentOrOmittedExpression = function () { - if (this.currentToken().tokenKind === 79 /* CommaToken */) { + if (this.currentToken().tokenKind === 80 /* CommaToken */) { return true; } @@ -23202,7 +23270,7 @@ var TypeScript; }; ParserImpl.prototype.parseAssignmentOrOmittedExpression = function () { - if (this.currentToken().tokenKind === 79 /* CommaToken */) { + if (this.currentToken().tokenKind === 80 /* CommaToken */) { return this.factory.omittedExpression(); } @@ -23219,29 +23287,29 @@ var TypeScript; case 12 /* RegularExpressionLiteral */: return true; - case 74 /* OpenBracketToken */: - case 72 /* OpenParenToken */: + case 75 /* OpenBracketToken */: + case 73 /* OpenParenToken */: return true; - case 80 /* LessThanToken */: + case 81 /* LessThanToken */: return true; - case 93 /* PlusPlusToken */: - case 94 /* MinusMinusToken */: - case 89 /* PlusToken */: - case 90 /* MinusToken */: - case 102 /* TildeToken */: - case 101 /* ExclamationToken */: + case 94 /* PlusPlusToken */: + case 95 /* MinusMinusToken */: + case 90 /* PlusToken */: + case 91 /* MinusToken */: + case 103 /* TildeToken */: + case 102 /* ExclamationToken */: return true; - case 70 /* OpenBraceToken */: + case 71 /* OpenBraceToken */: return true; - case 85 /* EqualsGreaterThanToken */: + case 86 /* EqualsGreaterThanToken */: return true; - case 118 /* SlashToken */: - case 119 /* SlashEqualsToken */: + case 119 /* SlashToken */: + case 120 /* SlashEqualsToken */: return true; case 50 /* SuperKeyword */: @@ -23284,9 +23352,9 @@ var TypeScript; ParserImpl.prototype.parseIfStatement = function () { var ifKeyword = this.eatKeyword(28 /* IfKeyword */); - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var condition = this.parseExpression(true); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); var statement = this.parseStatement(); var elseClause = null; @@ -23334,7 +23402,7 @@ var TypeScript; }; ParserImpl.prototype.isVariableDeclarator = function () { - if (this.currentNode() !== null && this.currentNode().kind() === 224 /* VariableDeclarator */) { + if (this.currentNode() !== null && this.currentNode().kind() === 225 /* VariableDeclarator */) { return true; } @@ -23342,7 +23410,7 @@ var TypeScript; }; ParserImpl.prototype.canReuseVariableDeclaratorNode = function (node) { - if (node === null || node.kind() !== 224 /* VariableDeclarator */) { + if (node === null || node.kind() !== 225 /* VariableDeclarator */) { return false; } @@ -23371,21 +23439,21 @@ var TypeScript; }; ParserImpl.prototype.isColonValueClause = function () { - return this.currentToken().tokenKind === 106 /* ColonToken */; + return this.currentToken().tokenKind === 107 /* ColonToken */; }; ParserImpl.prototype.isEqualsValueClause = function (inParameter) { var token0 = this.currentToken(); - if (token0.tokenKind === 107 /* EqualsToken */) { + if (token0.tokenKind === 108 /* EqualsToken */) { return true; } if (!this.previousToken().hasTrailingNewLine()) { - if (token0.tokenKind === 85 /* EqualsGreaterThanToken */) { + if (token0.tokenKind === 86 /* EqualsGreaterThanToken */) { return false; } - if (token0.tokenKind === 70 /* OpenBraceToken */ && inParameter) { + if (token0.tokenKind === 71 /* OpenBraceToken */ && inParameter) { return false; } @@ -23396,7 +23464,7 @@ var TypeScript; }; ParserImpl.prototype.parseEqualsValueClause = function (allowIn) { - var equalsToken = this.eatToken(107 /* EqualsToken */); + var equalsToken = this.eatToken(108 /* EqualsToken */); var value = this.parseAssignmentExpression(allowIn); return this.factory.equalsValueClause(equalsToken, value); @@ -23466,11 +23534,11 @@ var TypeScript; continue; } - if (token0Kind === 105 /* QuestionToken */ && precedence <= 3 /* ConditionalExpressionPrecedence */) { - var questionToken = this.eatToken(105 /* QuestionToken */); + if (token0Kind === 106 /* QuestionToken */ && precedence <= 3 /* ConditionalExpressionPrecedence */) { + var questionToken = this.eatToken(106 /* QuestionToken */); var whenTrueExpression = this.parseAssignmentExpression(allowIn); - var colon = this.eatToken(106 /* ColonToken */); + var colon = this.eatToken(107 /* ColonToken */); var whenFalseExpression = this.parseAssignmentExpression(allowIn); leftOperand = this.factory.conditionalExpression(leftOperand, questionToken, whenTrueExpression, colon, whenFalseExpression); @@ -23486,7 +23554,7 @@ var TypeScript; ParserImpl.prototype.tryMergeBinaryExpressionTokens = function () { var token0 = this.currentToken(); - if (token0.tokenKind === 81 /* GreaterThanToken */ && !token0.hasTrailingTrivia()) { + if (token0.tokenKind === 82 /* GreaterThanToken */ && !token0.hasTrailingTrivia()) { var storage = this.mergeTokensStorage; storage[0] = 0 /* None */; storage[1] = 0 /* None */; @@ -23504,20 +23572,20 @@ var TypeScript; } } - if (storage[0] === 81 /* GreaterThanToken */) { - if (storage[1] === 81 /* GreaterThanToken */) { - if (storage[2] === 107 /* EqualsToken */) { - return { tokenCount: 4, syntaxKind: 114 /* GreaterThanGreaterThanGreaterThanEqualsToken */ }; + if (storage[0] === 82 /* GreaterThanToken */) { + if (storage[1] === 82 /* GreaterThanToken */) { + if (storage[2] === 108 /* EqualsToken */) { + return { tokenCount: 4, syntaxKind: 115 /* GreaterThanGreaterThanGreaterThanEqualsToken */ }; } else { - return { tokenCount: 3, syntaxKind: 97 /* GreaterThanGreaterThanGreaterThanToken */ }; + return { tokenCount: 3, syntaxKind: 98 /* GreaterThanGreaterThanGreaterThanToken */ }; } - } else if (storage[1] === 107 /* EqualsToken */) { - return { tokenCount: 3, syntaxKind: 113 /* GreaterThanGreaterThanEqualsToken */ }; + } else if (storage[1] === 108 /* EqualsToken */) { + return { tokenCount: 3, syntaxKind: 114 /* GreaterThanGreaterThanEqualsToken */ }; } else { - return { tokenCount: 2, syntaxKind: 96 /* GreaterThanGreaterThanToken */ }; + return { tokenCount: 2, syntaxKind: 97 /* GreaterThanGreaterThanToken */ }; } - } else if (storage[0] === 107 /* EqualsToken */) { - return { tokenCount: 2, syntaxKind: 83 /* GreaterThanEqualsToken */ }; + } else if (storage[0] === 108 /* EqualsToken */) { + return { tokenCount: 2, syntaxKind: 84 /* GreaterThanEqualsToken */ }; } } @@ -23526,18 +23594,18 @@ var TypeScript; ParserImpl.prototype.isRightAssociative = function (expressionKind) { switch (expressionKind) { - case 173 /* AssignmentExpression */: - case 174 /* AddAssignmentExpression */: - case 175 /* SubtractAssignmentExpression */: - case 176 /* MultiplyAssignmentExpression */: - case 177 /* DivideAssignmentExpression */: - case 178 /* ModuloAssignmentExpression */: - case 179 /* AndAssignmentExpression */: - case 180 /* ExclusiveOrAssignmentExpression */: - case 181 /* OrAssignmentExpression */: - case 182 /* LeftShiftAssignmentExpression */: - case 183 /* SignedRightShiftAssignmentExpression */: - case 184 /* UnsignedRightShiftAssignmentExpression */: + case 174 /* AssignmentExpression */: + case 175 /* AddAssignmentExpression */: + case 176 /* SubtractAssignmentExpression */: + case 177 /* MultiplyAssignmentExpression */: + case 178 /* DivideAssignmentExpression */: + case 179 /* ModuloAssignmentExpression */: + case 180 /* AndAssignmentExpression */: + case 181 /* ExclusiveOrAssignmentExpression */: + case 182 /* OrAssignmentExpression */: + case 183 /* LeftShiftAssignmentExpression */: + case 184 /* SignedRightShiftAssignmentExpression */: + case 185 /* UnsignedRightShiftAssignmentExpression */: return true; default: return false; @@ -23557,7 +23625,7 @@ var TypeScript; while (true) { var currentTokenKind = this.currentToken().tokenKind; switch (currentTokenKind) { - case 72 /* OpenParenToken */: + case 73 /* OpenParenToken */: if (inObjectCreation) { return expression; } @@ -23565,7 +23633,7 @@ var TypeScript; expression = this.factory.invocationExpression(expression, this.parseArgumentList(null)); continue; - case 80 /* LessThanToken */: + case 81 /* LessThanToken */: if (inObjectCreation) { return expression; } @@ -23578,12 +23646,12 @@ var TypeScript; break; - case 74 /* OpenBracketToken */: + case 75 /* OpenBracketToken */: expression = this.parseElementAccessExpression(expression, inObjectCreation); continue; - case 93 /* PlusPlusToken */: - case 94 /* MinusMinusToken */: + case 94 /* PlusPlusToken */: + case 95 /* MinusMinusToken */: if (this.previousToken() !== null && this.previousToken().hasTrailingNewLine()) { break; } @@ -23591,8 +23659,8 @@ var TypeScript; expression = this.factory.postfixUnaryExpression(TypeScript.SyntaxFacts.getPostfixUnaryExpressionFromOperatorToken(currentTokenKind), expression, this.eatAnyToken()); continue; - case 76 /* DotToken */: - expression = this.factory.memberAccessExpression(expression, this.eatToken(76 /* DotToken */), this.eatIdentifierNameToken()); + case 77 /* DotToken */: + expression = this.factory.memberAccessExpression(expression, this.eatToken(77 /* DotToken */), this.eatIdentifierNameToken()); continue; } @@ -23603,14 +23671,14 @@ var TypeScript; ParserImpl.prototype.tryParseArgumentList = function () { var typeArgumentList = null; - if (this.currentToken().tokenKind === 80 /* LessThanToken */) { + if (this.currentToken().tokenKind === 81 /* LessThanToken */) { var rewindPoint = this.getRewindPoint(); try { typeArgumentList = this.tryParseTypeArgumentList(true); var token0 = this.currentToken(); - var isOpenParen = token0.tokenKind === 72 /* OpenParenToken */; - var isDot = token0.tokenKind === 76 /* DotToken */; + var isOpenParen = token0.tokenKind === 73 /* OpenParenToken */; + var isDot = token0.tokenKind === 77 /* DotToken */; var isOpenParenOrDot = isOpenParen || isDot; if (typeArgumentList === null || !isOpenParenOrDot) { this.rewind(rewindPoint); @@ -23621,14 +23689,14 @@ var TypeScript; var diagnostic = new TypeScript.Diagnostic(this.fileName, this.currentTokenStart(), token0.width(), TypeScript.DiagnosticCode.A_parameter_list_must_follow_a_generic_type_argument_list_expected, null); this.addDiagnostic(diagnostic); - return this.factory.argumentList(typeArgumentList, TypeScript.Syntax.emptyToken(72 /* OpenParenToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.emptyToken(73 /* CloseParenToken */)); + return this.factory.argumentList(typeArgumentList, TypeScript.Syntax.emptyToken(73 /* OpenParenToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.emptyToken(74 /* CloseParenToken */)); } } finally { this.releaseRewindPoint(rewindPoint); } } - if (this.currentToken().tokenKind === 72 /* OpenParenToken */) { + if (this.currentToken().tokenKind === 73 /* OpenParenToken */) { return this.parseArgumentList(typeArgumentList); } @@ -23636,7 +23704,7 @@ var TypeScript; }; ParserImpl.prototype.parseArgumentList = function (typeArgumentList) { - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var arguments = TypeScript.Syntax.emptySeparatedList; if (openParenToken.fullWidth() > 0) { @@ -23645,17 +23713,17 @@ var TypeScript; openParenToken = this.addSkippedTokensAfterToken(openParenToken, result.skippedTokens); } - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); return this.factory.argumentList(typeArgumentList, openParenToken, arguments, closeParenToken); }; ParserImpl.prototype.parseElementAccessExpression = function (expression, inObjectCreation) { var start = this.currentTokenStart(); - var openBracketToken = this.eatToken(74 /* OpenBracketToken */); + var openBracketToken = this.eatToken(75 /* OpenBracketToken */); var argumentExpression; - if (this.currentToken().tokenKind === 75 /* CloseBracketToken */ && inObjectCreation) { + if (this.currentToken().tokenKind === 76 /* CloseBracketToken */ && inObjectCreation) { var end = this.currentTokenStart() + this.currentToken().width(); var diagnostic = new TypeScript.Diagnostic(this.fileName, start, end - start, TypeScript.DiagnosticCode.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead, null); this.addDiagnostic(diagnostic); @@ -23665,7 +23733,7 @@ var TypeScript; argumentExpression = this.parseExpression(true); } - var closeBracketToken = this.eatToken(75 /* CloseBracketToken */); + var closeBracketToken = this.eatToken(76 /* CloseBracketToken */); return this.factory.elementAccessExpression(expression, openBracketToken, argumentExpression, closeBracketToken); }; @@ -23673,7 +23741,7 @@ var TypeScript; ParserImpl.prototype.parseTermWorker = function () { var currentToken = this.currentToken(); - if (currentToken.tokenKind === 85 /* EqualsGreaterThanToken */) { + if (currentToken.tokenKind === 86 /* EqualsGreaterThanToken */) { return this.parseSimpleArrowFunctionExpression(); } @@ -23725,20 +23793,20 @@ var TypeScript; case 14 /* StringLiteral */: return this.parseLiteralExpression(); - case 74 /* OpenBracketToken */: + case 75 /* OpenBracketToken */: return this.parseArrayLiteralExpression(); - case 70 /* OpenBraceToken */: + case 71 /* OpenBraceToken */: return this.parseObjectLiteralExpression(); - case 72 /* OpenParenToken */: + case 73 /* OpenParenToken */: return this.parseParenthesizedOrArrowFunctionExpression(); - case 80 /* LessThanToken */: + case 81 /* LessThanToken */: return this.parseCastOrArrowFunctionExpression(); - case 118 /* SlashToken */: - case 119 /* SlashEqualsToken */: + case 119 /* SlashToken */: + case 120 /* SlashEqualsToken */: var result = this.tryReparseDivideAsRegularExpression(); if (result !== null) { return result; @@ -23766,17 +23834,17 @@ var TypeScript; case 14 /* StringLiteral */: case 13 /* NumericLiteral */: case 12 /* RegularExpressionLiteral */: - case 93 /* PlusPlusToken */: - case 94 /* MinusMinusToken */: - case 75 /* CloseBracketToken */: - case 71 /* CloseBraceToken */: + case 94 /* PlusPlusToken */: + case 95 /* MinusMinusToken */: + case 76 /* CloseBracketToken */: + case 72 /* CloseBraceToken */: return null; } } currentToken = this.currentTokenAllowingRegularExpression(); - if (currentToken.tokenKind === 118 /* SlashToken */ || currentToken.tokenKind === 119 /* SlashEqualsToken */) { + if (currentToken.tokenKind === 119 /* SlashToken */ || currentToken.tokenKind === 120 /* SlashEqualsToken */) { return null; } else if (currentToken.tokenKind === 12 /* RegularExpressionLiteral */) { return this.parseLiteralExpression(); @@ -23850,9 +23918,9 @@ var TypeScript; }; ParserImpl.prototype.parseCastExpression = function () { - var lessThanToken = this.eatToken(80 /* LessThanToken */); + var lessThanToken = this.eatToken(81 /* LessThanToken */); var type = this.parseType(); - var greaterThanToken = this.eatToken(81 /* GreaterThanToken */); + var greaterThanToken = this.eatToken(82 /* GreaterThanToken */); var expression = this.parseUnaryExpression(); return this.factory.castExpression(lessThanToken, type, greaterThanToken, expression); @@ -23864,9 +23932,9 @@ var TypeScript; return result; } - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var expression = this.parseExpression(true); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); return this.factory.parenthesizedExpression(openParenToken, expression, closeParenToken); }; @@ -23899,11 +23967,11 @@ var TypeScript; var callSignature = this.parseCallSignature(true); - if (requireArrow && this.currentToken().tokenKind !== 85 /* EqualsGreaterThanToken */) { + if (requireArrow && this.currentToken().tokenKind !== 86 /* EqualsGreaterThanToken */) { return null; } - var equalsGreaterThanToken = this.eatToken(85 /* EqualsGreaterThanToken */); + var equalsGreaterThanToken = this.eatToken(86 /* EqualsGreaterThanToken */); var body = this.parseArrowFunctionBody(); return this.factory.parenthesizedArrowFunctionExpression(callSignature, equalsGreaterThanToken, body); @@ -23918,40 +23986,40 @@ var TypeScript; }; ParserImpl.prototype.isSimpleArrowFunctionExpression = function () { - if (this.currentToken().tokenKind === 85 /* EqualsGreaterThanToken */) { + if (this.currentToken().tokenKind === 86 /* EqualsGreaterThanToken */) { return true; } - return this.isIdentifier(this.currentToken()) && this.peekToken(1).tokenKind === 85 /* EqualsGreaterThanToken */; + return this.isIdentifier(this.currentToken()) && this.peekToken(1).tokenKind === 86 /* EqualsGreaterThanToken */; }; ParserImpl.prototype.parseSimpleArrowFunctionExpression = function () { var identifier = this.eatIdentifierToken(); - var equalsGreaterThanToken = this.eatToken(85 /* EqualsGreaterThanToken */); + var equalsGreaterThanToken = this.eatToken(86 /* EqualsGreaterThanToken */); var body = this.parseArrowFunctionBody(); return this.factory.simpleArrowFunctionExpression(identifier, equalsGreaterThanToken, body); }; ParserImpl.prototype.isBlock = function () { - return this.currentToken().tokenKind === 70 /* OpenBraceToken */; + return this.currentToken().tokenKind === 71 /* OpenBraceToken */; }; ParserImpl.prototype.isDefinitelyArrowFunctionExpression = function () { var token0 = this.currentToken(); - if (token0.tokenKind !== 72 /* OpenParenToken */) { + if (token0.tokenKind !== 73 /* OpenParenToken */) { return false; } var token1 = this.peekToken(1); var token2; - if (token1.tokenKind === 73 /* CloseParenToken */) { + if (token1.tokenKind === 74 /* CloseParenToken */) { token2 = this.peekToken(2); - return token2.tokenKind === 106 /* ColonToken */ || token2.tokenKind === 85 /* EqualsGreaterThanToken */ || token2.tokenKind === 70 /* OpenBraceToken */; + return token2.tokenKind === 107 /* ColonToken */ || token2.tokenKind === 86 /* EqualsGreaterThanToken */ || token2.tokenKind === 71 /* OpenBraceToken */; } - if (token1.tokenKind === 77 /* DotDotDotToken */) { + if (token1.tokenKind === 78 /* DotDotDotToken */) { return true; } @@ -23960,19 +24028,19 @@ var TypeScript; } token2 = this.peekToken(2); - if (token2.tokenKind === 106 /* ColonToken */) { + if (token2.tokenKind === 107 /* ColonToken */) { return true; } var token3 = this.peekToken(3); - if (token2.tokenKind === 105 /* QuestionToken */) { - if (token3.tokenKind === 106 /* ColonToken */ || token3.tokenKind === 73 /* CloseParenToken */ || token3.tokenKind === 79 /* CommaToken */) { + if (token2.tokenKind === 106 /* QuestionToken */) { + if (token3.tokenKind === 107 /* ColonToken */ || token3.tokenKind === 74 /* CloseParenToken */ || token3.tokenKind === 80 /* CommaToken */) { return true; } } - if (token2.tokenKind === 73 /* CloseParenToken */) { - if (token3.tokenKind === 85 /* EqualsGreaterThanToken */) { + if (token2.tokenKind === 74 /* CloseParenToken */) { + if (token3.tokenKind === 86 /* EqualsGreaterThanToken */) { return true; } } @@ -23982,7 +24050,7 @@ var TypeScript; ParserImpl.prototype.isPossiblyArrowFunctionExpression = function () { var token0 = this.currentToken(); - if (token0.tokenKind !== 72 /* OpenParenToken */) { + if (token0.tokenKind !== 73 /* OpenParenToken */) { return true; } @@ -23993,17 +24061,17 @@ var TypeScript; } var token2 = this.peekToken(2); - if (token2.tokenKind === 107 /* EqualsToken */) { + if (token2.tokenKind === 108 /* EqualsToken */) { return true; } - if (token2.tokenKind === 79 /* CommaToken */) { + if (token2.tokenKind === 80 /* CommaToken */) { return true; } - if (token2.tokenKind === 73 /* CloseParenToken */) { + if (token2.tokenKind === 74 /* CloseParenToken */) { var token3 = this.peekToken(3); - if (token3.tokenKind === 106 /* ColonToken */) { + if (token3.tokenKind === 107 /* ColonToken */) { return true; } } @@ -24012,13 +24080,13 @@ var TypeScript; }; ParserImpl.prototype.parseObjectLiteralExpression = function () { - var openBraceToken = this.eatToken(70 /* OpenBraceToken */); + var openBraceToken = this.eatToken(71 /* OpenBraceToken */); var result = this.parseSeparatedSyntaxList(32768 /* ObjectLiteralExpression_PropertyAssignments */); var propertyAssignments = result.list; openBraceToken = this.addSkippedTokensAfterToken(openBraceToken, result.skippedTokens); - var closeBraceToken = this.eatToken(71 /* CloseBraceToken */); + var closeBraceToken = this.eatToken(72 /* CloseBraceToken */); return this.factory.objectLiteralExpression(openBraceToken, propertyAssignments, closeBraceToken); }; @@ -24042,14 +24110,14 @@ var TypeScript; }; ParserImpl.prototype.isGetAccessorPropertyAssignment = function (inErrorRecovery) { - return this.currentToken().tokenKind === 64 /* GetKeyword */ && this.isPropertyName(this.peekToken(1), inErrorRecovery); + return this.currentToken().tokenKind === 65 /* GetKeyword */ && this.isPropertyName(this.peekToken(1), inErrorRecovery); }; ParserImpl.prototype.parseGetAccessorPropertyAssignment = function () { - var getKeyword = this.eatKeyword(64 /* GetKeyword */); + var getKeyword = this.eatKeyword(65 /* GetKeyword */); var propertyName = this.eatPropertyName(); - var openParenToken = this.eatToken(72 /* OpenParenToken */); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); var typeAnnotation = this.parseOptionalTypeAnnotation(false); var block = this.parseBlock(false, true); @@ -24057,15 +24125,15 @@ var TypeScript; }; ParserImpl.prototype.isSetAccessorPropertyAssignment = function (inErrorRecovery) { - return this.currentToken().tokenKind === 68 /* SetKeyword */ && this.isPropertyName(this.peekToken(1), inErrorRecovery); + return this.currentToken().tokenKind === 69 /* SetKeyword */ && this.isPropertyName(this.peekToken(1), inErrorRecovery); }; ParserImpl.prototype.parseSetAccessorPropertyAssignment = function () { - var setKeyword = this.eatKeyword(68 /* SetKeyword */); + var setKeyword = this.eatKeyword(69 /* SetKeyword */); var propertyName = this.eatPropertyName(); - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var parameter = this.parseParameter(); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); var block = this.parseBlock(false, true); return this.factory.setAccessorPropertyAssignment(setKeyword, propertyName, openParenToken, parameter, closeParenToken, block); @@ -24093,7 +24161,7 @@ var TypeScript; ParserImpl.prototype.parseSimplePropertyAssignment = function () { var propertyName = this.eatPropertyName(); - var colonToken = this.eatToken(106 /* ColonToken */); + var colonToken = this.eatToken(107 /* ColonToken */); var expression = this.parseAssignmentExpression(true); return this.factory.simplePropertyAssignment(propertyName, colonToken, expression); @@ -24119,13 +24187,13 @@ var TypeScript; }; ParserImpl.prototype.parseArrayLiteralExpression = function () { - var openBracketToken = this.eatToken(74 /* OpenBracketToken */); + var openBracketToken = this.eatToken(75 /* OpenBracketToken */); var result = this.parseSeparatedSyntaxList(65536 /* ArrayLiteralExpression_AssignmentExpressions */); var expressions = result.list; openBracketToken = this.addSkippedTokensAfterToken(openBracketToken, result.skippedTokens); - var closeBracketToken = this.eatToken(75 /* CloseBracketToken */); + var closeBracketToken = this.eatToken(76 /* CloseBracketToken */); return this.factory.arrayLiteralExpression(openBracketToken, expressions, closeBracketToken); }; @@ -24140,7 +24208,7 @@ var TypeScript; }; ParserImpl.prototype.parseBlock = function (parseBlockEvenWithNoOpenBrace, checkForStrictMode) { - var openBraceToken = this.eatToken(70 /* OpenBraceToken */); + var openBraceToken = this.eatToken(71 /* OpenBraceToken */); var statements = TypeScript.Syntax.emptyList; @@ -24155,7 +24223,7 @@ var TypeScript; this.setStrictMode(savedIsInStrictMode); } - var closeBraceToken = this.eatToken(71 /* CloseBraceToken */); + var closeBraceToken = this.eatToken(72 /* CloseBraceToken */); return this.factory.block(openBraceToken, statements, closeBraceToken); }; @@ -24169,19 +24237,19 @@ var TypeScript; }; ParserImpl.prototype.parseOptionalTypeParameterList = function (requireCompleteTypeParameterList) { - if (this.currentToken().tokenKind !== 80 /* LessThanToken */) { + if (this.currentToken().tokenKind !== 81 /* LessThanToken */) { return null; } var rewindPoint = this.getRewindPoint(); try { - var lessThanToken = this.eatToken(80 /* LessThanToken */); + var lessThanToken = this.eatToken(81 /* LessThanToken */); var result = this.parseSeparatedSyntaxList(524288 /* TypeParameterList_TypeParameters */); var typeParameterList = result.list; lessThanToken = this.addSkippedTokensAfterToken(lessThanToken, result.skippedTokens); - var greaterThanToken = this.eatToken(81 /* GreaterThanToken */); + var greaterThanToken = this.eatToken(82 /* GreaterThanToken */); if (requireCompleteTypeParameterList && greaterThanToken.fullWidth() === 0) { this.rewind(rewindPoint); @@ -24217,7 +24285,7 @@ var TypeScript; }; ParserImpl.prototype.parseParameterList = function () { - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var parameters = TypeScript.Syntax.emptySeparatedList; if (openParenToken.width() > 0) { @@ -24226,12 +24294,12 @@ var TypeScript; openParenToken = this.addSkippedTokensAfterToken(openParenToken, result.skippedTokens); } - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); return this.factory.parameterList(openParenToken, parameters, closeParenToken); }; ParserImpl.prototype.isTypeAnnotation = function () { - return this.currentToken().tokenKind === 106 /* ColonToken */; + return this.currentToken().tokenKind === 107 /* ColonToken */; }; ParserImpl.prototype.parseOptionalTypeAnnotation = function (allowStringLiteral) { @@ -24239,7 +24307,7 @@ var TypeScript; }; ParserImpl.prototype.parseTypeAnnotation = function (allowStringLiteral) { - var colonToken = this.eatToken(106 /* ColonToken */); + var colonToken = this.eatToken(107 /* ColonToken */); var type = allowStringLiteral && this.currentToken().tokenKind === 14 /* StringLiteral */ ? this.eatToken(14 /* StringLiteral */) : this.parseType(); return this.factory.typeAnnotation(colonToken, type); @@ -24255,9 +24323,9 @@ var TypeScript; } else { var type = this.parseNonArrayType(); - while (this.currentToken().tokenKind === 74 /* OpenBracketToken */) { - var openBracketToken = this.eatToken(74 /* OpenBracketToken */); - var closeBracketToken = this.eatToken(75 /* CloseBracketToken */); + while (this.currentToken().tokenKind === 75 /* OpenBracketToken */) { + var openBracketToken = this.eatToken(75 /* OpenBracketToken */); + var closeBracketToken = this.eatToken(76 /* CloseBracketToken */); type = this.factory.arrayType(type, openBracketToken, closeBracketToken); } @@ -24309,7 +24377,7 @@ var TypeScript; ParserImpl.prototype.parseFunctionType = function () { var typeParameterList = this.parseOptionalTypeParameterList(false); var parameterList = this.parseParameterList(); - var equalsGreaterThanToken = this.eatToken(85 /* EqualsGreaterThanToken */); + var equalsGreaterThanToken = this.eatToken(86 /* EqualsGreaterThanToken */); var returnType = this.parseType(); return this.factory.functionType(typeParameterList, parameterList, equalsGreaterThanToken, returnType); @@ -24318,7 +24386,7 @@ var TypeScript; ParserImpl.prototype.parseConstructorType = function () { var newKeyword = this.eatKeyword(31 /* NewKeyword */); var parameterList = this.parseParameterList(); - var equalsGreaterThanToken = this.eatToken(85 /* EqualsGreaterThanToken */); + var equalsGreaterThanToken = this.eatToken(86 /* EqualsGreaterThanToken */); var type = this.parseType(); return this.factory.constructorType(newKeyword, null, parameterList, equalsGreaterThanToken, type); @@ -24329,12 +24397,12 @@ var TypeScript; }; ParserImpl.prototype.isObjectType = function () { - return this.currentToken().tokenKind === 70 /* OpenBraceToken */; + return this.currentToken().tokenKind === 71 /* OpenBraceToken */; }; ParserImpl.prototype.isFunctionType = function () { var tokenKind = this.currentToken().tokenKind; - return tokenKind === 72 /* OpenParenToken */ || tokenKind === 80 /* LessThanToken */; + return tokenKind === 73 /* OpenParenToken */ || tokenKind === 81 /* LessThanToken */; }; ParserImpl.prototype.isConstructorType = function () { @@ -24348,9 +24416,10 @@ var TypeScript; ParserImpl.prototype.isPredefinedType = function () { switch (this.currentToken().tokenKind) { case 60 /* AnyKeyword */: - case 67 /* NumberKeyword */: + case 68 /* NumberKeyword */: case 61 /* BooleanKeyword */: - case 69 /* StringKeyword */: + case 62 /* BoolKeyword */: + case 70 /* StringKeyword */: case 41 /* VoidKeyword */: return true; } @@ -24359,12 +24428,12 @@ var TypeScript; }; ParserImpl.prototype.isParameter = function () { - if (this.currentNode() !== null && this.currentNode().kind() === 242 /* Parameter */) { + if (this.currentNode() !== null && this.currentNode().kind() === 243 /* Parameter */) { return true; } var token = this.currentToken(); - if (token.tokenKind === 77 /* DotDotDotToken */) { + if (token.tokenKind === 78 /* DotDotDotToken */) { return true; } @@ -24376,11 +24445,11 @@ var TypeScript; }; ParserImpl.prototype.parseParameter = function () { - if (this.currentNode() !== null && this.currentNode().kind() === 242 /* Parameter */) { + if (this.currentNode() !== null && this.currentNode().kind() === 243 /* Parameter */) { return this.eatNode(); } - var dotDotDotToken = this.tryEatToken(77 /* DotDotDotToken */); + var dotDotDotToken = this.tryEatToken(78 /* DotDotDotToken */); var publicOrPrivateToken = null; if (ParserImpl.isPublicOrPrivateKeyword(this.currentToken())) { @@ -24388,7 +24457,7 @@ var TypeScript; } var identifier = this.eatIdentifierToken(); - var questionToken = this.tryEatToken(105 /* QuestionToken */); + var questionToken = this.tryEatToken(106 /* QuestionToken */); var typeAnnotation = this.parseOptionalTypeAnnotation(true); var equalsValueClause = null; @@ -24526,7 +24595,7 @@ var TypeScript; TypeScript.Debug.assert(skippedTokens !== items); var separatorKind = this.separatorKind(currentListType); - var allowAutomaticSemicolonInsertion = separatorKind === 78 /* SemicolonToken */; + var allowAutomaticSemicolonInsertion = separatorKind === 79 /* SemicolonToken */; var inErrorRecovery = false; var listWasTerminated = false; @@ -24554,7 +24623,7 @@ var TypeScript; inErrorRecovery = false; var currentToken = this.currentToken(); - if (currentToken.tokenKind === separatorKind || currentToken.tokenKind === 79 /* CommaToken */) { + if (currentToken.tokenKind === separatorKind || currentToken.tokenKind === 80 /* CommaToken */) { items.push(this.eatAnyToken()); continue; } @@ -24594,10 +24663,10 @@ var TypeScript; case 65536 /* ArrayLiteralExpression_AssignmentExpressions */: case 262144 /* TypeArgumentList_Types */: case 524288 /* TypeParameterList_TypeParameters */: - return 79 /* CommaToken */; + return 80 /* CommaToken */; case 512 /* ObjectType_TypeMembers */: - return 78 /* SemicolonToken */; + return 79 /* SemicolonToken */; case 1 /* SourceUnit_ModuleElements */: case 1024 /* ClassOrInterfaceDeclaration_HeritageClauses */: @@ -24698,28 +24767,28 @@ var TypeScript; }; ParserImpl.prototype.isExpectedEnumDeclaration_EnumElementsTerminator = function () { - return this.currentToken().tokenKind === 71 /* CloseBraceToken */; + return this.currentToken().tokenKind === 72 /* CloseBraceToken */; }; ParserImpl.prototype.isExpectedModuleDeclaration_ModuleElementsTerminator = function () { - return this.currentToken().tokenKind === 71 /* CloseBraceToken */; + return this.currentToken().tokenKind === 72 /* CloseBraceToken */; }; ParserImpl.prototype.isExpectedObjectType_TypeMembersTerminator = function () { - return this.currentToken().tokenKind === 71 /* CloseBraceToken */; + return this.currentToken().tokenKind === 72 /* CloseBraceToken */; }; ParserImpl.prototype.isExpectedObjectLiteralExpression_PropertyAssignmentsTerminator = function () { - return this.currentToken().tokenKind === 71 /* CloseBraceToken */; + return this.currentToken().tokenKind === 72 /* CloseBraceToken */; }; ParserImpl.prototype.isExpectedLiteralExpression_AssignmentExpressionsTerminator = function () { - return this.currentToken().tokenKind === 75 /* CloseBracketToken */; + return this.currentToken().tokenKind === 76 /* CloseBracketToken */; }; ParserImpl.prototype.isExpectedTypeArgumentList_TypesTerminator = function () { var token = this.currentToken(); - if (token.tokenKind === 81 /* GreaterThanToken */) { + if (token.tokenKind === 82 /* GreaterThanToken */) { return true; } @@ -24732,11 +24801,11 @@ var TypeScript; ParserImpl.prototype.isExpectedTypeParameterList_TypeParametersTerminator = function () { var token = this.currentToken(); - if (token.tokenKind === 81 /* GreaterThanToken */) { + if (token.tokenKind === 82 /* GreaterThanToken */) { return true; } - if (token.tokenKind === 72 /* OpenParenToken */ || token.tokenKind === 70 /* OpenBraceToken */ || token.tokenKind === 48 /* ExtendsKeyword */ || token.tokenKind === 51 /* ImplementsKeyword */) { + if (token.tokenKind === 73 /* OpenParenToken */ || token.tokenKind === 71 /* OpenBraceToken */ || token.tokenKind === 48 /* ExtendsKeyword */ || token.tokenKind === 51 /* ImplementsKeyword */) { return true; } @@ -24745,15 +24814,15 @@ var TypeScript; ParserImpl.prototype.isExpectedParameterList_ParametersTerminator = function () { var token = this.currentToken(); - if (token.tokenKind === 73 /* CloseParenToken */) { + if (token.tokenKind === 74 /* CloseParenToken */) { return true; } - if (token.tokenKind === 70 /* OpenBraceToken */) { + if (token.tokenKind === 71 /* OpenBraceToken */) { return true; } - if (token.tokenKind === 85 /* EqualsGreaterThanToken */) { + if (token.tokenKind === 86 /* EqualsGreaterThanToken */) { return true; } @@ -24761,7 +24830,7 @@ var TypeScript; }; ParserImpl.prototype.isExpectedVariableDeclaration_VariableDeclarators_DisallowInTerminator = function () { - if (this.currentToken().tokenKind === 78 /* SemicolonToken */ || this.currentToken().tokenKind === 73 /* CloseParenToken */) { + if (this.currentToken().tokenKind === 79 /* SemicolonToken */ || this.currentToken().tokenKind === 74 /* CloseParenToken */) { return true; } @@ -24773,11 +24842,11 @@ var TypeScript; }; ParserImpl.prototype.isExpectedVariableDeclaration_VariableDeclarators_AllowInTerminator = function () { - if (this.previousToken().tokenKind === 79 /* CommaToken */) { + if (this.previousToken().tokenKind === 80 /* CommaToken */) { return false; } - if (this.currentToken().tokenKind === 85 /* EqualsGreaterThanToken */) { + if (this.currentToken().tokenKind === 86 /* EqualsGreaterThanToken */) { return true; } @@ -24786,7 +24855,7 @@ var TypeScript; ParserImpl.prototype.isExpectedClassOrInterfaceDeclaration_HeritageClausesTerminator = function () { var token0 = this.currentToken(); - if (token0.tokenKind === 70 /* OpenBraceToken */ || token0.tokenKind === 71 /* CloseBraceToken */) { + if (token0.tokenKind === 71 /* OpenBraceToken */ || token0.tokenKind === 72 /* CloseBraceToken */) { return true; } @@ -24808,23 +24877,23 @@ var TypeScript; ParserImpl.prototype.isExpectedArgumentList_AssignmentExpressionsTerminator = function () { var token0 = this.currentToken(); - return token0.tokenKind === 73 /* CloseParenToken */ || token0.tokenKind === 78 /* SemicolonToken */; + return token0.tokenKind === 74 /* CloseParenToken */ || token0.tokenKind === 79 /* SemicolonToken */; }; ParserImpl.prototype.isExpectedClassDeclaration_ClassElementsTerminator = function () { - return this.currentToken().tokenKind === 71 /* CloseBraceToken */; + return this.currentToken().tokenKind === 72 /* CloseBraceToken */; }; ParserImpl.prototype.isExpectedSwitchStatement_SwitchClausesTerminator = function () { - return this.currentToken().tokenKind === 71 /* CloseBraceToken */; + return this.currentToken().tokenKind === 72 /* CloseBraceToken */; }; ParserImpl.prototype.isExpectedSwitchClause_StatementsTerminator = function () { - return this.currentToken().tokenKind === 71 /* CloseBraceToken */ || this.isSwitchClause(); + return this.currentToken().tokenKind === 72 /* CloseBraceToken */ || this.isSwitchClause(); }; ParserImpl.prototype.isExpectedBlock_StatementsTerminator = function () { - return this.currentToken().tokenKind === 71 /* CloseBraceToken */; + return this.currentToken().tokenKind === 72 /* CloseBraceToken */; }; ParserImpl.prototype.isExpectedTryBlock_StatementsTerminator = function () { @@ -24903,7 +24972,7 @@ var TypeScript; return true; } - if (this.currentToken().tokenKind === 79 /* CommaToken */) { + if (this.currentToken().tokenKind === 80 /* CommaToken */) { return true; } @@ -25347,7 +25416,7 @@ var TypeScript; } else if (!parameter.typeAnnotation) { this.pushDiagnostic1(parameterFullStart, parameter, TypeScript.DiagnosticCode.Index_signature_parameter_must_have_a_type_annotation); return true; - } else if (parameter.typeAnnotation.type.kind() !== 69 /* StringKeyword */ && parameter.typeAnnotation.type.kind() !== 67 /* NumberKeyword */) { + } else if (parameter.typeAnnotation.type.kind() !== 70 /* StringKeyword */ && parameter.typeAnnotation.type.kind() !== 68 /* NumberKeyword */) { this.pushDiagnostic1(parameterFullStart, parameter, TypeScript.DiagnosticCode.Index_signature_parameter_type_must_be_string_or_number); return true; } @@ -25415,7 +25484,7 @@ var TypeScript; GrammarCheckerWalker.prototype.checkForDisallowedDeclareModifier = function (modifiers) { if (this.inAmbientDeclaration) { - var declareToken = TypeScript.SyntaxUtilities.getToken(modifiers, 63 /* DeclareKeyword */); + var declareToken = TypeScript.SyntaxUtilities.getToken(modifiers, 64 /* DeclareKeyword */); if (declareToken) { this.pushDiagnostic1(this.childFullStart(modifiers, declareToken), declareToken, TypeScript.DiagnosticCode.declare_modifier_not_allowed_for_code_already_in_an_ambient_context); @@ -25428,7 +25497,7 @@ var TypeScript; GrammarCheckerWalker.prototype.checkForRequiredDeclareModifier = function (moduleElement, typeKeyword, modifiers) { if (!this.inAmbientDeclaration && this.syntaxTree.isDeclaration()) { - if (!TypeScript.SyntaxUtilities.containsToken(modifiers, 63 /* DeclareKeyword */)) { + if (!TypeScript.SyntaxUtilities.containsToken(modifiers, 64 /* DeclareKeyword */)) { this.pushDiagnostic1(this.childFullStart(moduleElement, typeKeyword), typeKeyword.firstToken(), TypeScript.DiagnosticCode.declare_modifier_required_for_top_level_element); return true; } @@ -25447,7 +25516,7 @@ var TypeScript; var lastElement = i === (n - 1); if (inFunctionOverloadChain) { - if (moduleElement.kind() !== 129 /* FunctionDeclaration */) { + if (moduleElement.kind() !== 130 /* FunctionDeclaration */) { this.pushDiagnostic1(moduleElementFullStart, moduleElement.firstToken(), TypeScript.DiagnosticCode.Function_implementation_expected); return true; } @@ -25460,9 +25529,9 @@ var TypeScript; } } - if (moduleElement.kind() === 129 /* FunctionDeclaration */) { + if (moduleElement.kind() === 130 /* FunctionDeclaration */) { functionDeclaration = moduleElement; - if (!TypeScript.SyntaxUtilities.containsToken(functionDeclaration.modifiers, 63 /* DeclareKeyword */)) { + if (!TypeScript.SyntaxUtilities.containsToken(functionDeclaration.modifiers, 64 /* DeclareKeyword */)) { inFunctionOverloadChain = functionDeclaration.block === null; functionOverloadChainName = functionDeclaration.identifier.valueText(); @@ -25484,7 +25553,7 @@ var TypeScript; }; GrammarCheckerWalker.prototype.checkClassOverloads = function (node) { - if (!this.inAmbientDeclaration && !TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */)) { + if (!this.inAmbientDeclaration && !TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */)) { var classElementFullStart = this.childFullStart(node, node.classElements); var inFunctionOverloadChain = false; @@ -25500,7 +25569,7 @@ var TypeScript; var isStaticOverload = null; if (inFunctionOverloadChain) { - if (classElement.kind() !== 135 /* MemberFunctionDeclaration */) { + if (classElement.kind() !== 136 /* MemberFunctionDeclaration */) { this.pushDiagnostic1(classElementFullStart, classElement.firstToken(), TypeScript.DiagnosticCode.Function_implementation_expected); return true; } @@ -25519,13 +25588,13 @@ var TypeScript; return true; } } else if (inConstructorOverloadChain) { - if (classElement.kind() !== 137 /* ConstructorDeclaration */) { + if (classElement.kind() !== 138 /* ConstructorDeclaration */) { this.pushDiagnostic1(classElementFullStart, classElement.firstToken(), TypeScript.DiagnosticCode.Constructor_implementation_expected); return true; } } - if (classElement.kind() === 135 /* MemberFunctionDeclaration */) { + if (classElement.kind() === 136 /* MemberFunctionDeclaration */) { memberFunctionDeclaration = classElement; inFunctionOverloadChain = memberFunctionDeclaration.block === null; @@ -25536,7 +25605,7 @@ var TypeScript; this.pushDiagnostic1(classElementFullStart, classElement.firstToken(), TypeScript.DiagnosticCode.Function_implementation_expected); return true; } - } else if (classElement.kind() === 137 /* ConstructorDeclaration */) { + } else if (classElement.kind() === 138 /* ConstructorDeclaration */) { var constructorDeclaration = classElement; inConstructorOverloadChain = constructorDeclaration.block === null; @@ -25560,7 +25629,7 @@ var TypeScript; var current = name; while (current !== null) { - if (current.kind() === 121 /* QualifiedName */) { + if (current.kind() === 122 /* QualifiedName */) { var qualifiedName = current; token = qualifiedName.right; tokenFullStart = nameFullStart + this.childFullStart(qualifiedName, token); @@ -25575,6 +25644,7 @@ var TypeScript; switch (token.valueText()) { case "any": case "number": + case "bool": case "boolean": case "string": case "void": @@ -25593,7 +25663,7 @@ var TypeScript; } var savedInAmbientDeclaration = this.inAmbientDeclaration; - this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */); + this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */); _super.prototype.visitClassDeclaration.call(this, node); this.inAmbientDeclaration = savedInAmbientDeclaration; }; @@ -25631,7 +25701,7 @@ var TypeScript; for (var i = 0, n = modifiers.childCount(); i < n; i++) { var modifier = modifiers.childAt(i); - if (modifier.tokenKind === 63 /* DeclareKeyword */) { + if (modifier.tokenKind === 64 /* DeclareKeyword */) { this.pushDiagnostic1(modifierFullStart, modifier, TypeScript.DiagnosticCode.declare_modifier_cannot_appear_on_an_interface_declaration); return true; } @@ -25805,7 +25875,7 @@ var TypeScript; } var savedInAmbientDeclaration = this.inAmbientDeclaration; - this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */); + this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */); _super.prototype.visitEnumDeclaration.call(this, node); this.inAmbientDeclaration = savedInAmbientDeclaration; }; @@ -25872,7 +25942,7 @@ var TypeScript; return true; } - if (modifier.tokenKind === 63 /* DeclareKeyword */) { + if (modifier.tokenKind === 64 /* DeclareKeyword */) { if (seenDeclareModifier) { this.pushDiagnostic1(modifierFullStart, modifier, TypeScript.DiagnosticCode.Accessibility_modifier_already_seen); return; @@ -25886,7 +25956,7 @@ var TypeScript; } if (seenDeclareModifier) { - this.pushDiagnostic1(modifierFullStart, modifier, TypeScript.DiagnosticCode._0_modifier_must_precede_1_modifier, [TypeScript.SyntaxFacts.getText(47 /* ExportKeyword */), TypeScript.SyntaxFacts.getText(63 /* DeclareKeyword */)]); + this.pushDiagnostic1(modifierFullStart, modifier, TypeScript.DiagnosticCode._0_modifier_must_precede_1_modifier, [TypeScript.SyntaxFacts.getText(47 /* ExportKeyword */), TypeScript.SyntaxFacts.getText(64 /* DeclareKeyword */)]); return; } @@ -25905,9 +25975,9 @@ var TypeScript; for (var i = 0, n = node.moduleElements.childCount(); i < n; i++) { var child = node.moduleElements.childAt(i); - if (child.kind() === 133 /* ImportDeclaration */) { + if (child.kind() === 134 /* ImportDeclaration */) { var importDeclaration = child; - if (importDeclaration.moduleReference.kind() === 245 /* ExternalModuleReference */) { + if (importDeclaration.moduleReference.kind() === 246 /* ExternalModuleReference */) { this.pushDiagnostic1(currentElementFullStart, importDeclaration, TypeScript.DiagnosticCode.Import_declarations_in_an_internal_module_cannot_reference_an_external_module, null); } } @@ -25920,7 +25990,7 @@ var TypeScript; }; GrammarCheckerWalker.prototype.checkForDisallowedDeclareModifierOnImportDeclaration = function (modifiers) { - var declareToken = TypeScript.SyntaxUtilities.getToken(modifiers, 63 /* DeclareKeyword */); + var declareToken = TypeScript.SyntaxUtilities.getToken(modifiers, 64 /* DeclareKeyword */); if (declareToken) { this.pushDiagnostic1(this.childFullStart(modifiers, declareToken), declareToken, TypeScript.DiagnosticCode.declare_modifier_not_allowed_on_import_declaration); @@ -25943,13 +26013,13 @@ var TypeScript; return; } - if (!TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */) && this.checkFunctionOverloads(node, node.moduleElements)) { + if (!TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */) && this.checkFunctionOverloads(node, node.moduleElements)) { this.skip(node); return; } if (node.stringLiteral) { - if (!this.inAmbientDeclaration && !TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */)) { + if (!this.inAmbientDeclaration && !TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */)) { var stringLiteralFullStart = this.childFullStart(node, node.stringLiteral); this.pushDiagnostic1(stringLiteralFullStart, node.stringLiteral, TypeScript.DiagnosticCode.Only_ambient_modules_can_use_quoted_names); this.skip(node); @@ -25963,7 +26033,7 @@ var TypeScript; } var savedInAmbientDeclaration = this.inAmbientDeclaration; - this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */); + this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */); _super.prototype.visitModuleDeclaration.call(this, node); this.inAmbientDeclaration = savedInAmbientDeclaration; }; @@ -25984,7 +26054,7 @@ var TypeScript; for (var i = 0, n = moduleElements.childCount(); i < n; i++) { var child = moduleElements.childAt(i); - if (child.kind() === 134 /* ExportAssignment */) { + if (child.kind() === 135 /* ExportAssignment */) { this.pushDiagnostic1(moduleElementFullStart, child, TypeScript.DiagnosticCode.Export_assignment_not_allowed_in_module_with_exported_element); return true; } @@ -26002,7 +26072,7 @@ var TypeScript; var errorFound = false; for (var i = 0, n = moduleElements.childCount(); i < n; i++) { var child = moduleElements.childAt(i); - if (child.kind() === 134 /* ExportAssignment */) { + if (child.kind() === 135 /* ExportAssignment */) { if (seenExportAssignment) { this.pushDiagnostic1(moduleElementFullStart, child, TypeScript.DiagnosticCode.Module_cannot_have_multiple_export_assignments); errorFound = true; @@ -26022,7 +26092,7 @@ var TypeScript; for (var i = 0, n = node.moduleElements.childCount(); i < n; i++) { var child = node.moduleElements.childAt(i); - if (child.kind() === 134 /* ExportAssignment */) { + if (child.kind() === 135 /* ExportAssignment */) { this.pushDiagnostic1(moduleElementFullStart, child, TypeScript.DiagnosticCode.Export_assignment_cannot_be_used_in_internal_modules); return true; @@ -26222,7 +26292,7 @@ var TypeScript; } var savedInAmbientDeclaration = this.inAmbientDeclaration; - this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */); + this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */); _super.prototype.visitFunctionDeclaration.call(this, node); this.inAmbientDeclaration = savedInAmbientDeclaration; }; @@ -26234,7 +26304,7 @@ var TypeScript; } var savedInAmbientDeclaration = this.inAmbientDeclaration; - this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */); + this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */); _super.prototype.visitVariableStatement.call(this, node); this.inAmbientDeclaration = savedInAmbientDeclaration; }; @@ -26255,7 +26325,7 @@ var TypeScript; }; GrammarCheckerWalker.prototype.visitObjectType = function (node) { - if (this.checkListSeparators(node, node.typeMembers, 78 /* SemicolonToken */)) { + if (this.checkListSeparators(node, node.typeMembers, 79 /* SemicolonToken */)) { this.skip(node); return; } @@ -26312,6 +26382,16 @@ var TypeScript; _super.prototype.visitSourceUnit.call(this, node); }; + + GrammarCheckerWalker.prototype.visitExternalModuleReference = function (node) { + if (node.moduleOrRequireKeyword.tokenKind === 66 /* ModuleKeyword */ && !this.syntaxTree.parseOptions().allowModuleKeywordInExternalModuleReference()) { + this.pushDiagnostic1(this.position(), node.moduleOrRequireKeyword, TypeScript.DiagnosticCode.module_is_deprecated_Use_require_instead); + this.skip(node); + return; + } + + _super.prototype.visitExternalModuleReference.call(this, node); + }; return GrammarCheckerWalker; })(TypeScript.PositionTrackingWalker); })(TypeScript || (TypeScript = {})); @@ -30140,6 +30220,15 @@ var TypeScript; } TypeScript.filePath = filePath; + function convertToDirectoryPath(dirPath) { + if (dirPath && dirPath.charAt(dirPath.length - 1) !== "/") { + dirPath += "/"; + } + + return dirPath; + } + TypeScript.convertToDirectoryPath = convertToDirectoryPath; + var normalizePathRegEx = /^\\\\[^\\]/; function normalizePath(path) { if (normalizePathRegEx.test(path)) { @@ -30174,7 +30263,9 @@ var TypeScript; this.removeComments = false; this.watch = false; this.noResolve = false; + this.allowBool = false; this.allowAutomaticSemicolonInsertion = true; + this.allowModuleKeywordInExternalModuleReference = false; this.noImplicitAny = false; this.noLib = false; this.codeGenTarget = 0 /* EcmaScript3 */; @@ -30188,6 +30279,7 @@ var TypeScript; this.useCaseSensitiveFileResolution = false; this.gatherDiagnostics = false; this.updateTC = false; + this.codepage = null; } return CompilationSettings; })(); @@ -30251,13 +30343,13 @@ var TypeScript; if (TypeScript.SyntaxFacts.isIdentifierNameOrAnyKeyword(token)) { token = scanner.scan(scannerDiagnostics, false); - if (token.tokenKind === 107 /* EqualsToken */) { + if (token.tokenKind === 108 /* EqualsToken */) { token = scanner.scan(scannerDiagnostics, false); - if (token.tokenKind === 65 /* ModuleKeyword */ || token.tokenKind === 66 /* RequireKeyword */) { + if (token.tokenKind === 66 /* ModuleKeyword */ || token.tokenKind === 67 /* RequireKeyword */) { token = scanner.scan(scannerDiagnostics, false); - if (token.tokenKind === 72 /* OpenParenToken */) { + if (token.tokenKind === 73 /* OpenParenToken */) { var afterOpenParenPosition = scanner.absoluteIndex(); token = scanner.scan(scannerDiagnostics, false); @@ -30347,7 +30439,7 @@ var TypeScript; TypeScript.preProcessFile = preProcessFile; function getParseOptions(settings) { - return new TypeScript.ParseOptions(settings.codeGenTarget, settings.allowAutomaticSemicolonInsertion); + return new TypeScript.ParseOptions(settings.codeGenTarget, settings.allowAutomaticSemicolonInsertion, settings.allowModuleKeywordInExternalModuleReference); } TypeScript.getParseOptions = getParseOptions; })(TypeScript || (TypeScript = {})); @@ -31409,6 +31501,16 @@ var TypeScript; return false; }; + DeclarationEmitter.prototype.resolveScriptReference = function (document, reference) { + if (!this.compiler.settings.noResolve || TypeScript.isRooted(reference)) { + return reference; + } + + var documentDir = TypeScript.convertToDirectoryPath(TypeScript.switchToForwardSlashes(TypeScript.getRootFilePath(document.fileName))); + var resolvedReferencePath = this.compiler.emitOptions.ioHost.resolvePath(documentDir + reference); + return resolvedReferencePath; + }; + DeclarationEmitter.prototype.emitReferencePaths = function (script) { if (this.emittedReferencePaths) { return; @@ -31419,10 +31521,10 @@ var TypeScript; var scriptReferences = script.referencedFiles; var addedGlobalDocument = false; for (var j = 0; j < scriptReferences.length; j++) { - var currentReference = scriptReferences[j]; + var currentReference = this.resolveScriptReference(this.document, scriptReferences[j]); var document = this.compiler.getDocument(currentReference); - if (this.compiler.emitOptions.outputMany || document.script.isDeclareFile || document.script.topLevelMod || !addedGlobalDocument) { + if (document && (this.compiler.emitOptions.outputMany || document.script.isDeclareFile || document.script.topLevelMod || !addedGlobalDocument)) { documents = documents.concat(document); if (!document.script.isDeclareFile && document.script.topLevelMod) { addedGlobalDocument = true; @@ -31435,10 +31537,10 @@ var TypeScript; if (!allDocuments[i].script.isDeclareFile && !allDocuments[i].script.topLevelMod) { var scriptReferences = allDocuments[i].script.referencedFiles; for (var j = 0; j < scriptReferences.length; j++) { - var currentReference = scriptReferences[j]; + var currentReference = this.resolveScriptReference(allDocuments[i], scriptReferences[j]); var document = this.compiler.getDocument(currentReference); - if (document.script.isDeclareFile || document.script.topLevelMod) { + if (document && (document.script.isDeclareFile || document.script.topLevelMod)) { for (var k = 0; k < documents.length; k++) { if (documents[k] == document) { break; @@ -32568,6 +32670,10 @@ var TypeScript; return true; } + if (this.rootSymbol) { + return PullSymbol.getIsExternallyVisible(this.rootSymbol, this, inIsExternallyVisibleSymbols); + } + if (this.isType()) { var associatedContainerSymbol = (this).getAssociatedContainerType(); if (associatedContainerSymbol) { @@ -32581,6 +32687,19 @@ var TypeScript; var container = this.getContainer(); if (container === null) { + var decls = this.getDeclarations(); + if (decls.length) { + var parentDecl = decls[0].getParentDecl(); + if (parentDecl) { + var parentSymbol = parentDecl.getSymbol(); + if (!parentSymbol || parentDecl.kind == 1 /* Script */) { + return true; + } + + return PullSymbol.getIsExternallyVisible(parentSymbol, this, inIsExternallyVisibleSymbols); + } + } + return true; } @@ -34707,7 +34826,7 @@ var TypeScript; newSignature.mimicSignature(signature, resolver); declAST = resolver.semanticInfoChain.getASTForDecl(decl); - TypeScript.Debug.assert(declAST != null, "Call signature for type '" + typeToSpecialize.toString() + "' could not be specialized because of a stale declaration"); + TypeScript.Debug.assert(declAST != null, "Call signature for type '" + typeToSpecialize.pullSymbolIDString + "' could not be specialized because of a stale declaration"); prevSpecializationSignature = decl.getSpecializingSignatureSymbol(); decl.setSpecializingSignatureSymbol(newSignature); @@ -34779,7 +34898,7 @@ var TypeScript; newSignature.mimicSignature(signature, resolver); declAST = resolver.semanticInfoChain.getASTForDecl(decl); - TypeScript.Debug.assert(declAST != null, "Construct signature for type '" + typeToSpecialize.toString() + "' could not be specialized because of a stale declaration"); + TypeScript.Debug.assert(declAST != null, "Construct signature for type '" + typeToSpecialize.pullSymbolIDString + "' could not be specialized because of a stale declaration"); prevSpecializationSignature = decl.getSpecializingSignatureSymbol(); decl.setSpecializingSignatureSymbol(newSignature); @@ -34851,7 +34970,7 @@ var TypeScript; newSignature.mimicSignature(signature, resolver); declAST = resolver.semanticInfoChain.getASTForDecl(decl); - TypeScript.Debug.assert(declAST != null, "Index signature for type '" + typeToSpecialize.toString() + "' could not be specialized because of a stale declaration"); + TypeScript.Debug.assert(declAST != null, "Index signature for type '" + typeToSpecialize.pullSymbolIDString + "' could not be specialized because of a stale declaration"); prevSpecializationSignature = decl.getSpecializingSignatureSymbol(); decl.setSpecializingSignatureSymbol(newSignature); @@ -35118,9 +35237,22 @@ var TypeScript; function getIDForTypeSubstitutions(types) { var substitution = ""; + var members = null; for (var i = 0; i < types.length; i++) { - substitution += types[i].pullSymbolIDString + "#"; + if (types[i].kind != 8388608 /* ObjectType */) { + substitution += types[i].pullSymbolIDString + "#"; + } else { + members = types[i].getMembers(); + + if (types[i].isResolved && members && members.length) { + for (var j = 0; j < members.length; j++) { + substitution += members[j].name + "@" + getIDForTypeSubstitutions([members[j].type]); + } + } else { + substitution += types[i].pullSymbolIDString + "#"; + } + } } return substitution; @@ -35338,6 +35470,7 @@ var TypeScript; this.genericASTResolutionStack = []; this.resolvingTypeReference = false; this.resolvingNamespaceMemberAccess = false; + this.resolvingTypeQueryExpression = false; this.resolveAggressively = false; this.canUseTypeSymbol = false; this.specializingToAny = false; @@ -35722,7 +35855,7 @@ var TypeScript; this._cachedRegExpInterfaceType = this.getSymbolFromDeclPath("RegExp", [], 16 /* Interface */); } - if (!this._cachedRegExpInterfaceType.isResolved) { + if (this._cachedRegExpInterfaceType && !this._cachedRegExpInterfaceType.isResolved) { this.resolveDeclaredSymbol(this._cachedRegExpInterfaceType, null, new TypeScript.PullTypeResolutionContext()); } @@ -36483,11 +36616,7 @@ var TypeScript; this.validateVariableDeclarationGroups(containerDecl, context); } - if (!context.isInBaseTypeResolution()) { - containerSymbol.setResolved(); - } else { - containerSymbol.inResolution = false; - } + containerSymbol.setResolved(); return containerSymbol; }; @@ -36511,6 +36640,7 @@ var TypeScript; }; PullTypeResolver.prototype.resolveReferenceTypeDeclaration = function (typeDeclAST, context) { + var _this = this; var typeDecl = this.getDeclForAST(typeDeclAST); var enclosingDecl = this.getEnclosingDecl(typeDecl); var typeDeclSymbol = typeDecl.getSymbol(); @@ -36608,6 +36738,11 @@ var TypeScript; if (wasInBaseTypeResolution) { typeDeclSymbol.inResolution = false; + + PullTypeResolver.typeCheckCallBacks.push(function () { + _this.resolveDeclaredSymbol(typeDeclSymbol, enclosingDecl, context); + }); + return typeDeclSymbol; } @@ -37161,6 +37296,11 @@ var TypeScript; if (funcDeclAST.returnTypeAnnotation) { var returnTypeSymbol = this.resolveTypeReference(funcDeclAST.returnTypeAnnotation, functionDecl, context); + if (this.genericTypeIsUsedWithoutRequiredTypeArguments(returnTypeSymbol, funcDeclAST.returnTypeAnnotation, context)) { + context.postError(this.unitPath, funcDeclAST.returnTypeAnnotation.minChar, funcDeclAST.returnTypeAnnotation.getLength(), TypeScript.DiagnosticCode.Generic_type_references_must_include_all_type_arguments, null, functionDecl); + returnTypeSymbol = this.specializeTypeToAny(returnTypeSymbol, functionDecl, context); + } + signature.returnType = returnTypeSymbol; if (this.isTypeArgumentOrWrapper(returnTypeSymbol)) { @@ -37414,7 +37554,10 @@ var TypeScript; var savedResolvingTypeReference = context.resolvingTypeReference; context.resolvingTypeReference = false; + var savedResolvingTypeQueryExpression = context.resolvingTypeQueryExpression; + context.resolvingTypeQueryExpression = true; var valueSymbol = this.resolveAST(typeQueryTerm, false, enclosingDecl, context); + context.resolvingTypeQueryExpression = savedResolvingTypeQueryExpression; context.resolvingTypeReference = savedResolvingTypeReference; if (valueSymbol && valueSymbol.isAlias()) { @@ -37653,13 +37796,25 @@ var TypeScript; if (!(varDecl.typeExpr || varDecl.init)) { var defaultType = this.semanticInfoChain.anyTypeSymbol; - if (this.compilationSettings.noImplicitAny && ((varDecl.getVarFlags() & 16384 /* ForInVariable */) === 0)) { - if (wrapperDecl.kind == 16384 /* Function */ || wrapperDecl.kind == 65536 /* Method */ || wrapperDecl.kind == 32768 /* ConstructorMethod */ || wrapperDecl.kind == 2097152 /* ConstructSignature */) { + if (this.compilationSettings.noImplicitAny && !TypeScript.hasFlag(varDecl.getVarFlags(), 16384 /* ForInVariable */)) { + if ((wrapperDecl.kind === 16384 /* Function */ || wrapperDecl.kind === 32768 /* ConstructorMethod */ || wrapperDecl.kind === 2097152 /* ConstructSignature */)) { context.postError(this.unitPath, varDecl.minChar, varDecl.getLength(), TypeScript.DiagnosticCode.Parameter_0_of_1_implicitly_has_an_any_type, [varDecl.id.actualText, enclosingDecl.name], enclosingDecl); - } else if (wrapperDecl.kind == 8388608 /* ObjectType */) { + } else if (wrapperDecl.kind === 65536 /* Method */) { + var parentDecl = wrapperDecl.getParentDecl(); + + if (!TypeScript.hasFlag(parentDecl.flags, 8 /* Ambient */)) { + context.postError(this.unitPath, varDecl.minChar, varDecl.getLength(), TypeScript.DiagnosticCode.Parameter_0_of_1_implicitly_has_an_any_type, [varDecl.id.actualText, enclosingDecl.name], enclosingDecl); + } else if (TypeScript.hasFlag(parentDecl.flags, 8 /* Ambient */) && !TypeScript.hasFlag(wrapperDecl.flags, 2 /* Private */)) { + context.postError(this.unitPath, varDecl.minChar, varDecl.getLength(), TypeScript.DiagnosticCode.Parameter_0_of_1_implicitly_has_an_any_type, [varDecl.id.actualText, enclosingDecl.name], enclosingDecl); + } + } else if (wrapperDecl.kind === 8388608 /* ObjectType */) { context.postError(this.unitPath, varDecl.minChar, varDecl.getLength(), TypeScript.DiagnosticCode.Member_0_of_object_type_implicitly_has_an_any_type, [varDecl.id.actualText], enclosingDecl); - } else if (wrapperDecl.kind != 1073741824 /* CatchBlock */) { - context.postError(this.unitPath, varDecl.minChar, varDecl.getLength(), TypeScript.DiagnosticCode.Variable_0_implicitly_has_an_any_type, [varDecl.id.actualText], enclosingDecl); + } else if (wrapperDecl.kind !== 1073741824 /* CatchBlock */) { + if (!TypeScript.hasFlag(wrapperDecl.flags, 8 /* Ambient */)) { + context.postError(this.unitPath, varDecl.minChar, varDecl.getLength(), TypeScript.DiagnosticCode.Variable_0_implicitly_has_an_any_type, [varDecl.id.actualText], enclosingDecl); + } else if (TypeScript.hasFlag(wrapperDecl.flags, 8 /* Ambient */) && !TypeScript.hasFlag(varDecl.getVarFlags(), 2 /* Private */)) { + context.postError(this.unitPath, varDecl.minChar, varDecl.getLength(), TypeScript.DiagnosticCode.Variable_0_implicitly_has_an_any_type, [varDecl.id.actualText], enclosingDecl); + } } } @@ -37889,6 +38044,10 @@ var TypeScript; } } + if (!functionSymbol.type && functionSymbol.isAccessor()) { + functionSymbol.type = signature.returnType; + } + if (this.isTypeArgumentOrWrapper(returnType) && functionSymbol) { functionSymbol.type.setHasGenericSignature(); } @@ -37896,8 +38055,121 @@ var TypeScript; } }; - PullTypeResolver.prototype.resolveFunctionDeclaration = function (funcDeclAST, context) { + PullTypeResolver.prototype.typeCheckFunctionDeclaration = function (funcDeclAST, funcDecl, signature, context) { var _this = this; + if (context.inTypeCheck && (!context.inSpecialization || !signature.isGeneric())) { + PullTypeResolver.typeCheckCallBacks.push(function () { + if (signature.hasBeenChecked || signature.getRootSymbol() != signature) { + return; + } + + var currentUnitPath = _this.unitPath; + _this.setUnitPath(funcDecl.getScriptName()); + var prevSeenSuperConstructorCall = _this.seenSuperConstructorCall; + _this.seenSuperConstructorCall = false; + + _this.resolveAST(funcDeclAST.block, false, funcDecl, context); + + _this.validateVariableDeclarationGroups(funcDecl, context); + + var enclosingDecl = _this.getEnclosingDecl(funcDecl); + + var hasReturn = (funcDecl.flags & (2048 /* Signature */ | 4194304 /* HasReturnStatement */)) != 0; + + var parameters = signature.parameters; + + if (funcDeclAST.isConstructor || TypeScript.hasFlag(funcDeclAST.getFunctionFlags(), 1024 /* ConstructMember */)) { + if (funcDecl.getSignatureSymbol() && funcDecl.getSignatureSymbol().isDefinition() && _this.enclosingClassIsDerived(funcDecl)) { + if (!_this.seenSuperConstructorCall) { + context.postError(_this.unitPath, funcDeclAST.minChar, 11, TypeScript.DiagnosticCode.Constructors_for_derived_classes_must_contain_a_super_call, null, enclosingDecl); + } else if (_this.superCallMustBeFirstStatementInConstructor(funcDecl, enclosingDecl)) { + var firstStatement = _this.getFirstStatementFromFunctionDeclAST(funcDeclAST); + if (!firstStatement || !_this.isSuperCallNode(firstStatement)) { + context.postError(_this.unitPath, funcDeclAST.minChar, 11, TypeScript.DiagnosticCode.A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties, null, enclosingDecl); + } + } + } + _this.typeCheckFunctionOverloads(funcDeclAST, context); + } else if (TypeScript.hasFlag(funcDeclAST.getFunctionFlags(), 4096 /* IndexerMember */)) { + var allIndexSignatures = enclosingDecl.getSymbol().type.getIndexSignatures(); + + for (var i = 0; i < allIndexSignatures.length; i++) { + if (!allIndexSignatures[i].isResolved) { + _this.resolveDeclaredSymbol(allIndexSignatures[i], allIndexSignatures[i].getDeclarations()[0].getParentDecl(), context); + } + + if (allIndexSignatures[i].parameters[0].type !== parameters[0].type) { + var stringIndexSignature = null; + var numberIndexSignature = null; + + var indexSignature = signature; + + var isNumericIndexer = parameters[0].type === _this.semanticInfoChain.numberTypeSymbol; + + if (isNumericIndexer) { + numberIndexSignature = indexSignature; + stringIndexSignature = allIndexSignatures[i]; + } else { + numberIndexSignature = allIndexSignatures[i]; + stringIndexSignature = indexSignature; + + if (enclosingDecl.getSymbol() === numberIndexSignature.getDeclarations()[0].getParentDecl().getSymbol()) { + break; + } + } + var comparisonInfo = new TypeComparisonInfo(); + var resolutionContext = new TypeScript.PullTypeResolutionContext(); + if (!_this.sourceIsSubtypeOfTarget(numberIndexSignature.returnType, stringIndexSignature.returnType, resolutionContext, comparisonInfo)) { + if (comparisonInfo.message) { + context.postError(_this.unitPath, funcDeclAST.minChar, funcDeclAST.getLength(), TypeScript.DiagnosticCode.Numeric_indexer_type_0_must_be_a_subtype_of_string_indexer_type_1_NL_2, [numberIndexSignature.returnType.toString(), stringIndexSignature.returnType.toString(), comparisonInfo.message], enclosingDecl); + } else { + context.postError(_this.unitPath, funcDeclAST.minChar, funcDeclAST.getLength(), TypeScript.DiagnosticCode.Numeric_indexer_type_0_must_be_a_subtype_of_string_indexer_type_1, [numberIndexSignature.returnType.toString(), stringIndexSignature.returnType.toString()], enclosingDecl); + } + } + break; + } + } + + var allMembers = enclosingDecl.getSymbol().type.getAllMembers(TypeScript.PullElementKind.All, true); + for (var i = 0; i < allMembers.length; i++) { + var name = allMembers[i].name; + if (name) { + if (!allMembers[i].isResolved) { + _this.resolveDeclaredSymbol(allMembers[i], allMembers[i].getDeclarations()[0].getParentDecl(), context); + } + + if (enclosingDecl.getSymbol() !== allMembers[i].getContainer()) { + var isMemberNumeric = isFinite(+name); + if (isNumericIndexer === isMemberNumeric) { + _this.checkThatMemberIsSubtypeOfIndexer(allMembers[i], indexSignature, funcDeclAST, context, enclosingDecl, isNumericIndexer); + } + } + } + } + } else { + if (funcDeclAST.block && funcDeclAST.returnTypeAnnotation != null && !hasReturn) { + var isVoidOrAny = _this.isAnyOrEquivalent(signature.returnType) || signature.returnType === _this.semanticInfoChain.voidTypeSymbol; + + if (!isVoidOrAny && !(funcDeclAST.block.statements.members.length > 0 && funcDeclAST.block.statements.members[0].nodeType() === 96 /* ThrowStatement */)) { + var funcName = funcDecl.getDisplayName(); + funcName = funcName ? funcName : "expression"; + + context.postError(_this.unitPath, funcDeclAST.returnTypeAnnotation.minChar, funcDeclAST.returnTypeAnnotation.getLength(), TypeScript.DiagnosticCode.Function_0_declared_a_non_void_return_type_but_has_no_return_expression, [funcName], enclosingDecl); + } + } + _this.typeCheckFunctionOverloads(funcDeclAST, context); + } + + _this.checkFunctionTypePrivacy(funcDeclAST, false, context); + _this.seenSuperConstructorCall = prevSeenSuperConstructorCall; + + signature.hasBeenChecked = true; + _this.setUnitPath(currentUnitPath); + }); + } + }; + + PullTypeResolver.prototype.resolveFunctionDeclaration = function (funcDeclAST, context) { var funcDecl = this.getDeclForAST(funcDeclAST); var funcSymbol = funcDecl.getSymbol(); @@ -37910,6 +38182,7 @@ var TypeScript; if (signature) { if (signature.isResolved) { + this.typeCheckFunctionDeclaration(funcDeclAST, funcDecl, signature, context); return funcSymbol; } @@ -38009,6 +38282,11 @@ var TypeScript; } } + if (this.genericTypeIsUsedWithoutRequiredTypeArguments(returnTypeSymbol, funcDeclAST.returnTypeAnnotation, context)) { + context.postError(this.unitPath, funcDeclAST.returnTypeAnnotation.minChar, funcDeclAST.returnTypeAnnotation.getLength(), TypeScript.DiagnosticCode.Generic_type_references_must_include_all_type_arguments, null, funcDecl); + returnTypeSymbol = this.specializeTypeToAny(returnTypeSymbol, funcDecl, context); + } + signature.returnType = returnTypeSymbol; if (isConstructor && returnTypeSymbol === this.semanticInfoChain.voidTypeSymbol) { @@ -38018,8 +38296,13 @@ var TypeScript; } else if (!funcDeclAST.isConstructor && !funcDeclAST.isConstructMember()) { if (funcDeclAST.isSignature()) { signature.returnType = this.semanticInfoChain.anyTypeSymbol; + var parentDeclFlags = 0 /* None */; + if (TypeScript.hasFlag(funcDecl.kind, 65536 /* Method */) || TypeScript.hasFlag(funcDecl.kind, 32768 /* ConstructorMethod */)) { + var parentDecl = funcDecl.getParentDecl(); + parentDeclFlags = parentDecl.flags; + } - if (this.compilationSettings.noImplicitAny) { + if (this.compilationSettings.noImplicitAny && (!TypeScript.hasFlag(parentDeclFlags, 8 /* Ambient */) || (TypeScript.hasFlag(parentDeclFlags, 8 /* Ambient */) && !TypeScript.hasFlag(funcDecl.flags, 2 /* Private */)))) { var funcDeclASTName = funcDeclAST.name; if (funcDeclASTName) { context.postError(this.unitPath, funcDeclAST.minChar, funcDeclAST.getLength(), TypeScript.DiagnosticCode._0_which_lacks_return_type_annotation_implicitly_has_an_any_return_type, [funcDeclASTName.actualText], funcDecl); @@ -38051,116 +38334,7 @@ var TypeScript; } } - if (context.inTypeCheck && (!context.inSpecialization || !signature.isGeneric())) { - var prevSeenSuperConstructorCall = this.seenSuperConstructorCall; - - PullTypeResolver.typeCheckCallBacks.push(function () { - if (signature.hasBeenChecked) { - return; - } - - _this.setUnitPath(funcDecl.getScriptName()); - _this.seenSuperConstructorCall = false; - - _this.resolveAST(funcDeclAST.block, false, funcDecl, context); - - _this.validateVariableDeclarationGroups(funcDecl, context); - - var enclosingDecl = _this.getEnclosingDecl(funcDecl); - - var hasReturn = (funcDecl.flags & (2048 /* Signature */ | 4194304 /* HasReturnStatement */)) != 0; - - var parameters = signature.parameters; - - if (funcDeclAST.isConstructor || TypeScript.hasFlag(funcDeclAST.getFunctionFlags(), 1024 /* ConstructMember */)) { - if (funcDecl.getSignatureSymbol() && funcDecl.getSignatureSymbol().isDefinition() && _this.enclosingClassIsDerived(funcDecl)) { - if (!_this.seenSuperConstructorCall) { - context.postError(_this.unitPath, funcDeclAST.minChar, 11, TypeScript.DiagnosticCode.Constructors_for_derived_classes_must_contain_a_super_call, null, enclosingDecl); - } else if (_this.superCallMustBeFirstStatementInConstructor(funcDecl, enclosingDecl)) { - var firstStatement = _this.getFirstStatementFromFunctionDeclAST(funcDeclAST); - if (!firstStatement || !_this.isSuperCallNode(firstStatement)) { - context.postError(_this.unitPath, funcDeclAST.minChar, 11, TypeScript.DiagnosticCode.A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties, null, enclosingDecl); - } - } - } - _this.typeCheckFunctionOverloads(funcDeclAST, context); - } else if (TypeScript.hasFlag(funcDeclAST.getFunctionFlags(), 4096 /* IndexerMember */)) { - var allIndexSignatures = enclosingDecl.getSymbol().type.getIndexSignatures(); - - for (var i = 0; i < allIndexSignatures.length; i++) { - if (!allIndexSignatures[i].isResolved) { - _this.resolveDeclaredSymbol(allIndexSignatures[i], allIndexSignatures[i].getDeclarations()[0].getParentDecl(), context); - } - - if (allIndexSignatures[i].parameters[0].type !== parameters[0].type) { - var stringIndexSignature = null; - var numberIndexSignature = null; - - var indexSignature = signature; - - var isNumericIndexer = parameters[0].type === _this.semanticInfoChain.numberTypeSymbol; - - if (isNumericIndexer) { - numberIndexSignature = indexSignature; - stringIndexSignature = allIndexSignatures[i]; - } else { - numberIndexSignature = allIndexSignatures[i]; - stringIndexSignature = indexSignature; - - if (enclosingDecl.getSymbol() === numberIndexSignature.getDeclarations()[0].getParentDecl().getSymbol()) { - break; - } - } - var comparisonInfo = new TypeComparisonInfo(); - var resolutionContext = new TypeScript.PullTypeResolutionContext(); - if (!_this.sourceIsSubtypeOfTarget(numberIndexSignature.returnType, stringIndexSignature.returnType, resolutionContext, comparisonInfo)) { - if (comparisonInfo.message) { - context.postError(_this.unitPath, funcDeclAST.minChar, funcDeclAST.getLength(), TypeScript.DiagnosticCode.Numeric_indexer_type_0_must_be_a_subtype_of_string_indexer_type_1_NL_2, [numberIndexSignature.returnType.toString(), stringIndexSignature.returnType.toString(), comparisonInfo.message], enclosingDecl); - } else { - context.postError(_this.unitPath, funcDeclAST.minChar, funcDeclAST.getLength(), TypeScript.DiagnosticCode.Numeric_indexer_type_0_must_be_a_subtype_of_string_indexer_type_1, [numberIndexSignature.returnType.toString(), stringIndexSignature.returnType.toString()], enclosingDecl); - } - } - break; - } - } - - var allMembers = enclosingDecl.getSymbol().type.getAllMembers(TypeScript.PullElementKind.All, true); - for (var i = 0; i < allMembers.length; i++) { - var name = allMembers[i].name; - if (name) { - if (!allMembers[i].isResolved) { - _this.resolveDeclaredSymbol(allMembers[i], allMembers[i].getDeclarations()[0].getParentDecl(), context); - } - - if (enclosingDecl.getSymbol() !== allMembers[i].getContainer()) { - var isMemberNumeric = isFinite(+name); - if (isNumericIndexer === isMemberNumeric) { - _this.checkThatMemberIsSubtypeOfIndexer(allMembers[i], indexSignature, funcDeclAST, context, enclosingDecl, isNumericIndexer); - } - } - } - } - } else { - if (funcDeclAST.block && funcDeclAST.returnTypeAnnotation != null && !hasReturn) { - var isVoidOrAny = _this.isAnyOrEquivalent(returnTypeSymbol) || returnTypeSymbol === _this.semanticInfoChain.voidTypeSymbol; - - if (!isVoidOrAny && !(funcDeclAST.block.statements.members.length > 0 && funcDeclAST.block.statements.members[0].nodeType() === 96 /* ThrowStatement */)) { - var funcName = funcDecl.getDisplayName(); - funcName = funcName ? funcName : "expression"; - - context.postError(_this.unitPath, funcDeclAST.returnTypeAnnotation.minChar, funcDeclAST.returnTypeAnnotation.getLength(), TypeScript.DiagnosticCode.Function_0_declared_a_non_void_return_type_but_has_no_return_expression, [funcName], enclosingDecl); - } - } - _this.typeCheckFunctionOverloads(funcDeclAST, context); - } - - _this.checkFunctionTypePrivacy(funcDeclAST, false, context); - _this.seenSuperConstructorCall = prevSeenSuperConstructorCall; - - signature.hasBeenChecked = true; - }); - } - + this.typeCheckFunctionDeclaration(funcDeclAST, funcDecl, signature, context); return funcSymbol; }; @@ -38178,6 +38352,9 @@ var TypeScript; if (signature) { if (signature.isResolved) { + if (!accessorSymbol.type) { + accessorSymbol.type = signature.returnType; + } return accessorSymbol; } @@ -38185,6 +38362,10 @@ var TypeScript; signature.returnType = this.semanticInfoChain.anyTypeSymbol; signature.setResolved(); + if (!accessorSymbol.type) { + accessorSymbol.type = signature.returnType; + } + return accessorSymbol; } @@ -38219,6 +38400,11 @@ var TypeScript; } } + if (this.genericTypeIsUsedWithoutRequiredTypeArguments(returnTypeSymbol, funcDeclAST.returnTypeAnnotation, context)) { + context.postError(this.unitPath, funcDeclAST.returnTypeAnnotation.minChar, funcDeclAST.returnTypeAnnotation.getLength(), TypeScript.DiagnosticCode.Generic_type_references_must_include_all_type_arguments, null, funcDecl); + returnTypeSymbol = this.specializeTypeToAny(returnTypeSymbol, funcDecl, context); + } + signature.returnType = returnTypeSymbol; } } else { @@ -39277,7 +39463,7 @@ var TypeScript; this.resolveDeclaredSymbol(nameSymbol, enclosingDecl, context); } - if (nameSymbol && (nameSymbol.type != this.semanticInfoChain.anyTypeSymbol || nameSymbol.hasFlag(16777216 /* IsAnnotatedWithAny */))) { + if (nameSymbol && (nameSymbol.type != this.semanticInfoChain.anyTypeSymbol || nameSymbol.hasFlag(16777216 /* IsAnnotatedWithAny */ | 1 /* Exported */))) { this.setSymbolForAST(nameAST, nameSymbol, context); } @@ -39327,7 +39513,9 @@ var TypeScript; if (nameSymbol.isType() && nameSymbol.isAlias()) { aliasSymbol = nameSymbol; - aliasSymbol.isUsedAsValue = true; + if (!context.resolvingTypeQueryExpression) { + aliasSymbol.isUsedAsValue = true; + } if (!nameSymbol.isResolved) { this.resolveDeclaredSymbol(nameSymbol, enclosingDecl, context); @@ -39414,7 +39602,9 @@ var TypeScript; var lhsType = lhs.type; if (lhs.isAlias()) { - (lhs).isUsedAsValue = true; + if (!context.resolvingTypeQueryExpression) { + (lhs).isUsedAsValue = true; + } lhsType = (lhs).getExportAssignedTypeSymbol(); } @@ -39571,6 +39761,14 @@ var TypeScript; return this.semanticInfoChain.stringTypeSymbol; } else if (id === "number") { return this.semanticInfoChain.numberTypeSymbol; + } else if (id === "bool") { + if (!this.compilationSettings.allowBool && !this.currentUnit.getProperties().unitContainsBool) { + this.currentUnit.getProperties().unitContainsBool = true; + context.postError(this.unitPath, nameAST.minChar, nameAST.getLength(), TypeScript.DiagnosticCode.Use_of_deprecated_type_bool_Use_boolean_instead, null, enclosingDecl); + return this.semanticInfoChain.booleanTypeSymbol; + } else { + return this.semanticInfoChain.booleanTypeSymbol; + } } else if (id === "boolean") { return this.semanticInfoChain.booleanTypeSymbol; } else if (id === "void") { @@ -39667,6 +39865,10 @@ var TypeScript; } else { typeArgs[i] = typeArg; } + + if (typeArgs[i].isError()) { + typeArgs[i] = this.semanticInfoChain.anyTypeSymbol; + } } } context.isResolvingClassExtendedType = savedIsResolvingClassExtendedType; @@ -39905,6 +40107,11 @@ var TypeScript; if (funcDeclAST.returnTypeAnnotation) { var returnTypeSymbol = this.resolveTypeReference(funcDeclAST.returnTypeAnnotation, functionDecl, context); + if (this.genericTypeIsUsedWithoutRequiredTypeArguments(returnTypeSymbol, funcDeclAST.returnTypeAnnotation, context)) { + context.postError(this.unitPath, funcDeclAST.returnTypeAnnotation.minChar, funcDeclAST.returnTypeAnnotation.getLength(), TypeScript.DiagnosticCode.Generic_type_references_must_include_all_type_arguments, null, functionDecl); + returnTypeSymbol = this.specializeTypeToAny(returnTypeSymbol, functionDecl, context); + } + signature.returnType = returnTypeSymbol; } else { if (assigningFunctionSignature) { @@ -39938,6 +40145,7 @@ var TypeScript; if (context.typeCheck()) { PullTypeResolver.typeCheckCallBacks.push(function () { + var currentUnitPath = _this.unitPath; _this.setUnitPath(functionDecl.getScriptName()); _this.seenSuperConstructorCall = false; @@ -39959,6 +40167,7 @@ var TypeScript; } _this.typeCheckFunctionOverloads(funcDeclAST, context); + _this.setUnitPath(currentUnitPath); }); } @@ -40415,6 +40624,7 @@ var TypeScript; PullTypeResolver.prototype.computeIndexExpressionSymbol = function (callEx, inContextuallyTypedAssignment, enclosingDecl, context) { var targetSymbol = this.resolveAST(callEx.operand1, inContextuallyTypedAssignment, enclosingDecl, context); + var indexType = this.resolveAST(callEx.operand2, inContextuallyTypedAssignment, enclosingDecl, context).type; var targetTypeSymbol = targetSymbol.type; @@ -40424,8 +40634,6 @@ var TypeScript; var elementType = targetTypeSymbol.getElementType(); - var indexType = this.resolveAST(callEx.operand2, inContextuallyTypedAssignment, enclosingDecl, context).type; - var isNumberIndex = indexType === this.semanticInfoChain.numberTypeSymbol || TypeScript.PullHelpers.symbolIsEnum(indexType); if (elementType && isNumberIndex) { @@ -40438,6 +40646,10 @@ var TypeScript; var member = this.getMemberSymbol(memberName, TypeScript.PullElementKind.SomeValue, targetTypeSymbol); if (member) { + if (!member.isResolved) { + this.resolveDeclaredSymbol(member, enclosingDecl, context); + } + return member.type; } } @@ -40462,10 +40674,10 @@ var TypeScript; if (paramSymbols.length) { paramType = paramSymbols[0].type; - if (paramType === this.semanticInfoChain.stringTypeSymbol) { + if (!stringSignature && paramType === this.semanticInfoChain.stringTypeSymbol) { stringSignature = signatures[i]; continue; - } else if (paramType === this.semanticInfoChain.numberTypeSymbol || paramType.kind === 64 /* Enum */) { + } else if (!numberSignature && (paramType === this.semanticInfoChain.numberTypeSymbol || paramType.kind === 64 /* Enum */)) { numberSignature = signatures[i]; continue; } @@ -40703,7 +40915,6 @@ var TypeScript; PullTypeResolver.prototype.computeInvocationExpressionSymbol = function (callEx, inContextuallyTypedAssignment, enclosingDecl, context, additionalResults) { var targetSymbol = this.resolveAST(callEx.target, inContextuallyTypedAssignment, enclosingDecl, context); - var targetAST = this.getLastIdentifierInTarget(callEx); var targetTypeSymbol = targetSymbol.type; @@ -40729,6 +40940,7 @@ var TypeScript; targetTypeSymbol = targetSymbol.type; } else { context.postError(this.unitPath, targetAST.minChar, targetAST.getLength(), TypeScript.DiagnosticCode.Calls_to_super_are_only_valid_inside_a_class, null, enclosingDecl); + this.resolveAST(callEx.arguments, inContextuallyTypedAssignment, enclosingDecl, context); return this.getNewErrorTypeSymbol(null); } @@ -40879,6 +41091,15 @@ var TypeScript; additionalResults.actualParametersContextTypeSymbols = actualParametersContextTypeSymbols; } + var prevIsResolvingSuperConstructorTarget = context.isResolvingSuperConstructorTarget; + if (isSuperCall) { + context.isResolvingSuperConstructorTarget = true; + } + this.resolveAST(callEx.arguments, inContextuallyTypedAssignment, enclosingDecl, context); + if (isSuperCall) { + context.isResolvingSuperConstructorTarget = prevIsResolvingSuperConstructorTarget; + } + if (!couldNotFindGenericOverload) { if (this.cachedFunctionInterfaceType() && this.sourceIsSubtypeOfTarget(targetTypeSymbol, this.cachedFunctionInterfaceType(), context)) { return this.semanticInfoChain.anyTypeSymbol; @@ -41323,8 +41544,11 @@ var TypeScript; } return returnType; - } else if (targetTypeSymbol.isClass()) { - return returnType; + } else { + this.resolveAST(callEx.arguments, inContextuallyTypedAssignment, enclosingDecl, context); + if (targetTypeSymbol.isClass()) { + return returnType; + } } context.postError(this.unitPath, targetAST.minChar, targetAST.getLength(), TypeScript.DiagnosticCode.Invalid_new_expression, null, enclosingDecl); @@ -41803,6 +42027,10 @@ var TypeScript; return false; } + if (!!(s1.typeParameters && s1.typeParameters.length) != !!(s2.typeParameters && s2.typeParameters.length)) { + return false; + } + if (s1.typeParameters && s2.typeParameters && (s1.typeParameters.length != s2.typeParameters.length)) { return false; } @@ -41879,7 +42107,7 @@ var TypeScript; for (var j = 0; j < extendsList.members.length; j++) { extendsSymbol = this.semanticInfoChain.getSymbolForAST(extendsList.members[j], sourceDecls[i].getScriptName()); - if (extendsSymbol == target || this.sourceExtendsTarget(extendsSymbol, target, context)) { + if (extendsSymbol && (extendsSymbol == target || this.sourceExtendsTarget(extendsSymbol, target, context))) { return true; } } @@ -42681,6 +42909,11 @@ var TypeScript; typeB = actuals[i]; + if (typeB.isAlias()) { + (typeB).isUsedAsValue = true; + typeB = (typeB).getExportAssignedTypeSymbol(); + } + if (typeA && !typeA.isResolved) { this.resolveDeclaredSymbol(typeA, enclosingDecl, context); } @@ -43418,6 +43651,10 @@ var TypeScript; if (!typeSymbol.isNamedTypeSymbol()) { if (typeSymbol.inSymbolPrivacyCheck) { + var associatedContainerType = typeSymbol.getAssociatedContainerType(); + if (associatedContainerType && associatedContainerType.isNamedTypeSymbol()) { + this.checkSymbolPrivacy(declSymbol, associatedContainerType, context, privacyErrorReporter); + } return; } @@ -43441,18 +43678,17 @@ var TypeScript; if (declSymbol.isExternallyVisible()) { var symbolIsVisible = symbol.isExternallyVisible(); - if (symbolIsVisible) { + if (symbolIsVisible && symbol.kind != 2 /* Primitive */ && symbol.kind != 8192 /* TypeParameter */) { var symbolPath = symbol.pathToRoot(); - if (symbolPath.length && symbolPath[symbolPath.length - 1].kind === 32 /* DynamicModule */) { - var declSymbolPath = declSymbol.pathToRoot(); + var declSymbolPath = declSymbol.pathToRoot(); + if (symbolPath[symbolPath.length - 1].kind === 32 /* DynamicModule */ && declSymbolPath[declSymbolPath.length - 1].kind == 32 /* DynamicModule */) { var verifyAlias = false; - if (declSymbolPath.length) { - if (declSymbolPath[declSymbolPath.length - 1] != symbolPath[symbolPath.length - 1]) { + + if (declSymbolPath[declSymbolPath.length - 1] != symbolPath[symbolPath.length - 1]) { + verifyAlias = true; + } else if (symbolPath.length > 1 && symbolPath[symbolPath.length - 2].kind == 32 /* DynamicModule */) { + if (declSymbolPath.length < 2 || declSymbolPath[declSymbolPath.length - 2] != symbolPath[symbolPath.length - 2]) { verifyAlias = true; - } else if (symbolPath.length > 1 && symbolPath[symbolPath.length - 2].kind == 32 /* DynamicModule */) { - if (declSymbolPath.length < 2 || declSymbolPath[declSymbolPath.length - 2] != symbolPath[symbolPath.length - 2]) { - verifyAlias = true; - } } } @@ -43469,6 +43705,10 @@ var TypeScript; symbol = symbolPath[symbolPath.length - 1]; } } + } else if (symbol.kind == 256 /* TypeAlias */) { + var aliasSymbol = symbol; + symbolIsVisible = true; + aliasSymbol.typeUsedExternally = true; } if (!symbolIsVisible) { @@ -44069,7 +44309,7 @@ var TypeScript; var extendedConstructorTypeProp = extendedConstructorType.findMember(propName); if (extendedConstructorTypeProp) { if (!extendedConstructorTypeProp.isResolved) { - var extendedClassAst = this.currentUnit.getASTForSymbol(extendedType); + var extendedClassAst = this.currentUnit.getASTForDecl(extendedType.getDeclarations()[0]); var extendedClassDecl = this.currentUnit.getDeclForAST(extendedClassAst); this.resolveDeclaredSymbol(extendedConstructorTypeProp, extendedClassDecl, resolutionContext); } @@ -44159,7 +44399,10 @@ var TypeScript; var contextForBaseTypeResolution = new TypeScript.PullTypeResolutionContext(); contextForBaseTypeResolution.isResolvingClassExtendedType = true; + var prevResolvingTypeReference = context.resolvingTypeReference; + context.resolvingTypeReference = true; var baseType = this.resolveAST(baseDeclAST, false, enclosingDecl, context); + context.resolvingTypeReference = prevResolvingTypeReference; contextForBaseTypeResolution.isResolvingClassExtendedType = false; var typeDeclIsClass = typeSymbol.isClass(); @@ -44380,6 +44623,7 @@ var TypeScript; }); this.syntaxElementSymbolMap = new TypeScript.DataMap(); this.symbolSyntaxElementMap = new TypeScript.DataMap(); + this.properties = new SemanticInfoProperties(); this.hasBeenTypeChecked = false; this.compilationUnitPath = compilationUnitPath; } @@ -44515,10 +44759,22 @@ var TypeScript; TypeScript.getDiagnosticsFromEnclosingDecl(this.topLevelDecls[i], semanticErrors); } }; + + SemanticInfo.prototype.getProperties = function () { + return this.properties; + }; return SemanticInfo; })(); TypeScript.SemanticInfo = SemanticInfo; + var SemanticInfoProperties = (function () { + function SemanticInfoProperties() { + this.unitContainsBool = false; + } + return SemanticInfoProperties; + })(); + TypeScript.SemanticInfoProperties = SemanticInfoProperties; + var SemanticInfoChain = (function () { function SemanticInfoChain() { this.units = [new SemanticInfo("")]; @@ -46731,7 +46987,7 @@ var TypeScript; constructorTypeSymbol.addDeclaration(constructorTypeDeclaration); this.semanticInfo.setSymbolForAST(constructorTypeAST, constructorTypeSymbol); - var signature = new TypeScript.PullDefinitionSignatureSymbol(2097152 /* ConstructSignature */); + var signature = new TypeScript.PullSignatureSymbol(2097152 /* ConstructSignature */); if ((constructorTypeAST).variableArgList) { signature.hasVarArgs = true; @@ -47337,7 +47593,7 @@ var TypeScript; signature.addTypeParameter(typeParameter); } else { - var typeParameterAST = this.semanticInfoChain.getASTForDecl(typeParameterDecls[0]); + var typeParameterAST = this.semanticInfoChain.getASTForDecl(typeParameter.getDeclarations()[0]); functionTypeDeclaration.addDiagnostic(new TypeScript.Diagnostic(this.semanticInfo.getPath(), typeParameterAST.minChar, typeParameterAST.getLength(), TypeScript.DiagnosticCode.Duplicate_identifier_0, [typeParameter.name])); } @@ -48347,9 +48603,9 @@ var TypeScript; return true; } - if (moduleElement.kind() === 133 /* ImportDeclaration */) { + if (moduleElement.kind() === 134 /* ImportDeclaration */) { var importDecl = moduleElement; - if (importDecl.moduleReference.kind() === 245 /* ExternalModuleReference */) { + if (importDecl.moduleReference.kind() === 246 /* ExternalModuleReference */) { return true; } } @@ -48484,7 +48740,7 @@ var TypeScript; flags = flags | 1 /* Exported */; } - if (TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */)) { + if (TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */)) { flags = flags | 8 /* Ambient */; } @@ -48563,7 +48819,7 @@ var TypeScript; }; SyntaxTreeToAstVisitor.prototype.getModuleNamesHelper = function (name, result) { - if (name.kind() === 121 /* QualifiedName */) { + if (name.kind() === 122 /* QualifiedName */) { var qualifiedName = name; this.getModuleNamesHelper(qualifiedName.left, result); this.movePast(qualifiedName.dotToken); @@ -48620,7 +48876,7 @@ var TypeScript; }; SyntaxTreeToAstVisitor.prototype.completeModuleDeclaration = function (node, result) { - if (TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */)) { + if (TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */)) { result.setModuleFlags(result.getModuleFlags() | 8 /* Ambient */); } }; @@ -48670,7 +48926,7 @@ var TypeScript; flags = flags | 1 /* Exported */; } - if (TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */)) { + if (TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */)) { flags = flags | 8 /* Ambient */; } @@ -48764,8 +49020,8 @@ var TypeScript; if (TypeScript.Syntax.isIntegerLiteral(expression)) { var token; switch (expression.kind()) { - case 163 /* PlusExpression */: - case 164 /* NegateExpression */: + case 164 /* PlusExpression */: + case 165 /* NegateExpression */: token = (expression).operand; break; default: @@ -48773,7 +49029,7 @@ var TypeScript; } var value = token.value(); - return value && expression.kind() === 164 /* NegateExpression */ ? -value : value; + return value && expression.kind() === 165 /* NegateExpression */ ? -value : value; } else if (this.compilationSettings.propagateEnumConstants) { switch (expression.kind()) { case 11 /* IdentifierName */: @@ -48782,7 +49038,7 @@ var TypeScript; }); return variableDeclarator ? variableDeclarator.constantValue : null; - case 201 /* LeftShiftExpression */: + case 202 /* LeftShiftExpression */: var binaryExpression = expression; return this.computeConstantValue(binaryExpression.left, declarators) << this.computeConstantValue(binaryExpression.right, declarators); } @@ -48858,7 +49114,7 @@ var TypeScript; flags = flags | 1 /* Exported */; } - if (TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */)) { + if (TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */)) { flags = flags | 8 /* Ambient */; } @@ -48924,17 +49180,17 @@ var TypeScript; SyntaxTreeToAstVisitor.prototype.getUnaryExpressionNodeType = function (kind) { switch (kind) { - case 163 /* PlusExpression */: + case 164 /* PlusExpression */: return 27 /* PlusExpression */; - case 164 /* NegateExpression */: + case 165 /* NegateExpression */: return 28 /* NegateExpression */; - case 165 /* BitwiseNotExpression */: + case 166 /* BitwiseNotExpression */: return 73 /* BitwiseNotExpression */; - case 166 /* LogicalNotExpression */: + case 167 /* LogicalNotExpression */: return 74 /* LogicalNotExpression */; - case 167 /* PreIncrementExpression */: + case 168 /* PreIncrementExpression */: return 75 /* PreIncrementExpression */; - case 168 /* PreDecrementExpression */: + case 169 /* PreDecrementExpression */: return 76 /* PreDecrementExpression */; default: throw TypeScript.Errors.invalidOperation(); @@ -49000,7 +49256,7 @@ var TypeScript; }; SyntaxTreeToAstVisitor.prototype.getArrowFunctionStatements = function (body) { - if (body.kind() === 145 /* Block */) { + if (body.kind() === 146 /* Block */) { return body.accept(this); } else { var expression = body.accept(this); @@ -49297,7 +49553,7 @@ var TypeScript; var operand = node.operand.accept(this); this.movePast(node.operatorToken); - var result = new TypeScript.UnaryExpression(node.kind() === 209 /* PostIncrementExpression */ ? 77 /* PostIncrementExpression */ : 78 /* PostDecrementExpression */, operand, null); + var result = new TypeScript.UnaryExpression(node.kind() === 210 /* PostIncrementExpression */ ? 77 /* PostIncrementExpression */ : 78 /* PostDecrementExpression */, operand, null); this.setSpan(result, start, node); return result; @@ -49363,77 +49619,77 @@ var TypeScript; SyntaxTreeToAstVisitor.prototype.getBinaryExpressionNodeType = function (node) { switch (node.kind()) { - case 172 /* CommaExpression */: + case 173 /* CommaExpression */: return 26 /* CommaExpression */; - case 173 /* AssignmentExpression */: + case 174 /* AssignmentExpression */: return 39 /* AssignmentExpression */; - case 174 /* AddAssignmentExpression */: + case 175 /* AddAssignmentExpression */: return 40 /* AddAssignmentExpression */; - case 175 /* SubtractAssignmentExpression */: + case 176 /* SubtractAssignmentExpression */: return 41 /* SubtractAssignmentExpression */; - case 176 /* MultiplyAssignmentExpression */: + case 177 /* MultiplyAssignmentExpression */: return 43 /* MultiplyAssignmentExpression */; - case 177 /* DivideAssignmentExpression */: + case 178 /* DivideAssignmentExpression */: return 42 /* DivideAssignmentExpression */; - case 178 /* ModuloAssignmentExpression */: + case 179 /* ModuloAssignmentExpression */: return 44 /* ModuloAssignmentExpression */; - case 179 /* AndAssignmentExpression */: + case 180 /* AndAssignmentExpression */: return 45 /* AndAssignmentExpression */; - case 180 /* ExclusiveOrAssignmentExpression */: + case 181 /* ExclusiveOrAssignmentExpression */: return 46 /* ExclusiveOrAssignmentExpression */; - case 181 /* OrAssignmentExpression */: + case 182 /* OrAssignmentExpression */: return 47 /* OrAssignmentExpression */; - case 182 /* LeftShiftAssignmentExpression */: + case 183 /* LeftShiftAssignmentExpression */: return 48 /* LeftShiftAssignmentExpression */; - case 183 /* SignedRightShiftAssignmentExpression */: + case 184 /* SignedRightShiftAssignmentExpression */: return 49 /* SignedRightShiftAssignmentExpression */; - case 184 /* UnsignedRightShiftAssignmentExpression */: + case 185 /* UnsignedRightShiftAssignmentExpression */: return 50 /* UnsignedRightShiftAssignmentExpression */; - case 186 /* LogicalOrExpression */: + case 187 /* LogicalOrExpression */: return 52 /* LogicalOrExpression */; - case 187 /* LogicalAndExpression */: + case 188 /* LogicalAndExpression */: return 53 /* LogicalAndExpression */; - case 188 /* BitwiseOrExpression */: + case 189 /* BitwiseOrExpression */: return 54 /* BitwiseOrExpression */; - case 189 /* BitwiseExclusiveOrExpression */: + case 190 /* BitwiseExclusiveOrExpression */: return 55 /* BitwiseExclusiveOrExpression */; - case 190 /* BitwiseAndExpression */: + case 191 /* BitwiseAndExpression */: return 56 /* BitwiseAndExpression */; - case 191 /* EqualsWithTypeConversionExpression */: + case 192 /* EqualsWithTypeConversionExpression */: return 57 /* EqualsWithTypeConversionExpression */; - case 192 /* NotEqualsWithTypeConversionExpression */: + case 193 /* NotEqualsWithTypeConversionExpression */: return 58 /* NotEqualsWithTypeConversionExpression */; - case 193 /* EqualsExpression */: + case 194 /* EqualsExpression */: return 59 /* EqualsExpression */; - case 194 /* NotEqualsExpression */: + case 195 /* NotEqualsExpression */: return 60 /* NotEqualsExpression */; - case 195 /* LessThanExpression */: + case 196 /* LessThanExpression */: return 61 /* LessThanExpression */; - case 196 /* GreaterThanExpression */: + case 197 /* GreaterThanExpression */: return 63 /* GreaterThanExpression */; - case 197 /* LessThanOrEqualExpression */: + case 198 /* LessThanOrEqualExpression */: return 62 /* LessThanOrEqualExpression */; - case 198 /* GreaterThanOrEqualExpression */: + case 199 /* GreaterThanOrEqualExpression */: return 64 /* GreaterThanOrEqualExpression */; - case 199 /* InstanceOfExpression */: + case 200 /* InstanceOfExpression */: return 34 /* InstanceOfExpression */; - case 200 /* InExpression */: + case 201 /* InExpression */: return 32 /* InExpression */; - case 201 /* LeftShiftExpression */: + case 202 /* LeftShiftExpression */: return 70 /* LeftShiftExpression */; - case 202 /* SignedRightShiftExpression */: + case 203 /* SignedRightShiftExpression */: return 71 /* SignedRightShiftExpression */; - case 203 /* UnsignedRightShiftExpression */: + case 204 /* UnsignedRightShiftExpression */: return 72 /* UnsignedRightShiftExpression */; - case 204 /* MultiplyExpression */: + case 205 /* MultiplyExpression */: return 67 /* MultiplyExpression */; - case 205 /* DivideExpression */: + case 206 /* DivideExpression */: return 68 /* DivideExpression */; - case 206 /* ModuloExpression */: + case 207 /* ModuloExpression */: return 69 /* ModuloExpression */; - case 207 /* AddExpression */: + case 208 /* AddExpression */: return 65 /* AddExpression */; - case 208 /* SubtractExpression */: + case 209 /* SubtractExpression */: return 66 /* SubtractExpression */; } @@ -49842,7 +50098,7 @@ var TypeScript; var switchClause = node.switchClauses.childAt(i); var translated = switchClause.accept(this); - if (switchClause.kind() === 232 /* DefaultSwitchClause */) { + if (switchClause.kind() === 233 /* DefaultSwitchClause */) { defaultCase = translated; } @@ -51304,14 +51560,6 @@ var TypeScript; return null; }; - TypeScriptCompiler.prototype.convertToDirectoryPath = function (dirPath) { - if (dirPath && dirPath.charAt(dirPath.length - 1) !== "/") { - dirPath += "/"; - } - - return dirPath; - }; - TypeScriptCompiler.prototype.setEmitOptions = function (ioHost) { this.emitOptions.ioHost = ioHost; @@ -51331,8 +51579,8 @@ var TypeScript; } } - this.emitOptions.compilationSettings.mapRoot = this.convertToDirectoryPath(TypeScript.switchToForwardSlashes(this.emitOptions.compilationSettings.mapRoot)); - this.emitOptions.compilationSettings.sourceRoot = this.convertToDirectoryPath(TypeScript.switchToForwardSlashes(this.emitOptions.compilationSettings.sourceRoot)); + this.emitOptions.compilationSettings.mapRoot = TypeScript.convertToDirectoryPath(TypeScript.switchToForwardSlashes(this.emitOptions.compilationSettings.mapRoot)); + this.emitOptions.compilationSettings.sourceRoot = TypeScript.convertToDirectoryPath(TypeScript.switchToForwardSlashes(this.emitOptions.compilationSettings.sourceRoot)); if (!this.emitOptions.compilationSettings.outFileOption && !this.emitOptions.compilationSettings.outDirOption && !this.emitOptions.compilationSettings.mapRoot && !this.emitOptions.compilationSettings.sourceRoot) { this.emitOptions.outputMany = true; @@ -51349,7 +51597,7 @@ var TypeScript; if (this.emitOptions.compilationSettings.outDirOption) { this.emitOptions.compilationSettings.outDirOption = TypeScript.switchToForwardSlashes(this.emitOptions.ioHost.resolvePath(this.emitOptions.compilationSettings.outDirOption)); - this.emitOptions.compilationSettings.outDirOption = this.convertToDirectoryPath(this.emitOptions.compilationSettings.outDirOption); + this.emitOptions.compilationSettings.outDirOption = TypeScript.convertToDirectoryPath(this.emitOptions.compilationSettings.outDirOption); } if (this.emitOptions.compilationSettings.outDirOption || this.emitOptions.compilationSettings.mapRoot || this.emitOptions.compilationSettings.sourceRoot) { @@ -54750,8 +54998,8 @@ var IO = (function () { } return { - readFile: function (path) { - return Environment.readFile(path); + readFile: function (path, codepage) { + return Environment.readFile(path, codepage); }, writeFile: function (path, contents, writeByteOrderMark) { Environment.writeFile(path, contents, writeByteOrderMark); @@ -54870,8 +55118,8 @@ var IO = (function () { var _module = require('module'); return { - readFile: function (file) { - return Environment.readFile(file); + readFile: function (file, codepage) { + return Environment.readFile(file, codepage); }, writeFile: function (path, contents, writeByteOrderMark) { Environment.writeFile(path, contents, writeByteOrderMark); @@ -55074,7 +55322,7 @@ var TypeScript; this.printVersion(); var optionsWord = TypeScript.getLocalizedText(TypeScript.DiagnosticCode.options, null); - var fileWord = TypeScript.getLocalizedText(TypeScript.DiagnosticCode.file, null); + var fileWord = TypeScript.getLocalizedText(TypeScript.DiagnosticCode.file1, null); var tscSyntax = "tsc [" + optionsWord + "] [" + fileWord + " ..]"; var syntaxHelp = TypeScript.getLocalizedText(TypeScript.DiagnosticCode.Syntax_0, [tscSyntax]); this.host.printLine(syntaxHelp); @@ -55243,7 +55491,7 @@ var TypeScript; if (match) { if (match[1] === '@') { - this.parseString(this.host.readFile(match[2]).contents); + this.parseString(this.host.readFile(match[2], null).contents); } else { var arg = match[2]; var option = this.findOption(arg); @@ -55307,7 +55555,7 @@ var TypeScript; var BatchCompiler = (function () { function BatchCompiler(ioHost) { this.ioHost = ioHost; - this.compilerVersion = "0.9.1.0"; + this.compilerVersion = "0.9.1.1"; this.inputFiles = []; this.resolvedFiles = []; this.inputFileNameToOutputFileName = new TypeScript.StringHashTable(); @@ -55405,9 +55653,11 @@ var TypeScript; if (this.compilationSettings.generateDeclarationFiles) { var references = TypeScript.getReferencedFiles(inputFile, this.getScriptSnapshot(inputFile)); - references.forEach(function (reference) { - referencedFiles.push(reference.path); - }); + for (var j = 0; j < references.length; j++) { + referencedFiles.push(references[j].path); + } + + inputFile = this.ioHost.resolvePath(inputFile); } resolvedFiles.push({ @@ -55560,7 +55810,7 @@ var TypeScript; locCode: TypeScript.DiagnosticCode.Concatenate_and_emit_output_to_single_file, args: null }, - type: TypeScript.DiagnosticCode.FILE, + type: TypeScript.DiagnosticCode.file2, set: function (str) { _this.compilationSettings.outFileOption = str; } @@ -55745,6 +55995,26 @@ var TypeScript; } }, 'v'); + opts.flag('allowbool', { + usage: { + locCode: TypeScript.DiagnosticCode.Allow_bool_as_a_synonym_for_boolean, + args: null + }, + set: function () { + _this.compilationSettings.allowBool = true; + } + }); + + opts.flag('allowimportmodule', { + usage: { + locCode: TypeScript.DiagnosticCode.Allow_module_as_a_synonym_for_require, + args: null + }, + set: function () { + _this.compilationSettings.allowModuleKeywordInExternalModuleReference = true; + } + }); + var locale = null; opts.option('locale', { experimental: true, @@ -55768,6 +56038,19 @@ var TypeScript; } }); + if (Environment.supportsCodePage()) { + opts.option('codepage', { + usage: { + locCode: TypeScript.DiagnosticCode.Specify_the_codepage_to_use_when_opening_source_files, + args: null + }, + type: TypeScript.DiagnosticCode.NUMBER, + set: function (arg) { + _this.compilationSettings.codepage = parseInt(arg, 10); + } + }); + } + opts.parse(this.ioHost.arguments); if (locale) { @@ -55823,7 +56106,7 @@ var TypeScript; return false; } - var fileContents = this.ioHost.readFile(filePath); + var fileContents = this.ioHost.readFile(filePath, this.compilationSettings.codepage); TypeScript.LocalizedDiagnosticMessages = JSON.parse(fileContents.contents); return true; }; @@ -55896,9 +56179,9 @@ var TypeScript; if (!firstTime) { var fileNames = ""; - lastResolvedFileSet.forEach(function (f) { - fileNames += Environment.newLine + " " + f; - }); + for (var k = 0; k < lastResolvedFileSet.length; k++) { + fileNames += Environment.newLine + " " + lastResolvedFileSet[k]; + } _this.ioHost.printLine(TypeScript.getLocalizedText(TypeScript.DiagnosticCode.NL_Recompiling_0, [fileNames])); } else { firstTime = false; @@ -55918,7 +56201,7 @@ var TypeScript; var fileInformation; try { - fileInformation = this.ioHost.readFile(fileName); + fileInformation = this.ioHost.readFile(fileName, this.compilationSettings.codepage); } catch (e) { this.addDiagnostic(new TypeScript.Diagnostic(null, 0, 0, TypeScript.DiagnosticCode.Cannot_read_file_0_1, [fileName, e.message])); fileInformation = new FileInformation("", 0 /* None */); diff --git a/_infrastructure/tests/typescript/typescript.js b/_infrastructure/tests/typescript/typescript.js index d25291ab0..3e6a2402d 100644 --- a/_infrastructure/tests/typescript/typescript.js +++ b/_infrastructure/tests/typescript/typescript.js @@ -345,7 +345,9 @@ var TypeScript; Option_mapRoot_cannot_be_specified_without_specifying_sourcemap_option: "Option mapRoot cannot be specified without specifying sourcemap option.", Option_sourceRoot_cannot_be_specified_without_specifying_sourcemap_option: "Option sourceRoot cannot be specified without specifying sourcemap option.", Options_mapRoot_and_sourceRoot_cannot_be_specified_without_specifying_sourcemap_option: "Options mapRoot and sourceRoot cannot be specified without specifying sourcemap option.", - Concatenate_and_emit_output_to_single_file: "Concatenate and emit output to single file", + Option_0_specified_without_1: "Option '{0}' specified without '{1}'", + codepage_option_not_supported_on_current_platform: "'codepage' option not supported on current platform.", + Concatenate_and_emit_output_to_single_file: "Concatenate and emit output to single file.", Generates_corresponding_0_file: "Generates corresponding {0} file", Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: "Specifies the location where debugger should locate map files instead of generated locations.", Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: "Specifies the location where debugger should locate TypeScript files instead of source locations.", @@ -361,7 +363,7 @@ var TypeScript; Specify_locale_for_errors_and_messages_For_example_0_or_1: "Specify locale for errors and messages. For example '{0}' or '{1}'", Syntax_0: "Syntax: {0}", options: "options", - file: "file", + file1: "file", Examples: "Examples:", Options: "Options:", Insert_command_line_options_and_files_from_a_file: "Insert command line options and files from a file.", @@ -370,10 +372,12 @@ var TypeScript; NL_Recompiling_0: "{NL}Recompiling ({0}):", STRING: "STRING", KIND: "KIND", - FILE: "FILE", + file2: "FILE", VERSION: "VERSION", LOCATION: "LOCATION", DIRECTORY: "DIRECTORY", + NUMBER: "NUMBER", + Specify_the_codepage_to_use_when_opening_source_files: "Specify the codepage to use when opening source files.", This_version_of_the_Javascript_runtime_does_not_support_the_0_function: "This version of the Javascript runtime does not support the '{0}' function.", Looking_up_path_for_identifier_token_did_not_result_in_an_identifer: "Looking up path for identifier token did not result in an identifer.", Unknown_rule: "Unknown rule", @@ -389,7 +393,11 @@ var TypeScript; Parameter_0_of_lambda_function_implicitly_has_an_any_type: "Parameter '{0}' of lambda function implicitly has an 'any' type.", Constructor_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: "Constructor signature, which lacks return-type annotation, implicitly has an 'any' return type.", Lambda_Function_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: "Lambda Function, which lacks return-type annotation, implicitly has an 'any' return type.", - Array_Literal_implicitly_has_an_any_type_from_widening: "Array Literal implicitly has an 'any' type from widening." + Array_Literal_implicitly_has_an_any_type_from_widening: "Array Literal implicitly has an 'any' type from widening.", + Use_of_deprecated_type_bool_Use_boolean_instead: "Use of deprecated type 'bool'. Use 'boolean' instead.", + module_is_deprecated_Use_require_instead: "'module(...)' is deprecated. Use 'require(...)' instead.", + Allow_bool_as_a_synonym_for_boolean: "Allow 'bool' as a synonym for 'boolean'.", + Allow_module_as_a_synonym_for_require: "Allow 'module(...)' as a synonym for 'require(...)'." }; })(TypeScript || (TypeScript = {})); var TypeScript; @@ -1068,18 +1076,16 @@ var TypeScript; function getDiagnosticInfoFromKey(diagnosticKey) { var result = TypeScript.diagnosticInformationMap[diagnosticKey]; - TypeScript.Debug.assert(result !== undefined && result !== null); + return result; } TypeScript.getDiagnosticInfoFromKey = getDiagnosticInfoFromKey; function getLocalizedText(diagnosticKey, args) { if (TypeScript.LocalizedDiagnosticMessages) { - TypeScript.Debug.assert(TypeScript.LocalizedDiagnosticMessages.hasOwnProperty(diagnosticKey)); } var diagnosticMessageText = TypeScript.LocalizedDiagnosticMessages ? TypeScript.LocalizedDiagnosticMessages[diagnosticKey] : diagnosticKey; - TypeScript.Debug.assert(diagnosticMessageText !== undefined && diagnosticMessageText !== null); var actualCount = args ? args.length : 0; @@ -1178,8 +1184,19 @@ var Environment = (function () { currentDirectory: function () { return (WScript).CreateObject("WScript.Shell").CurrentDirectory; }, - readFile: function (path) { + supportsCodePage: function () { + return (WScript).ReadFile; + }, + readFile: function (path, codepage) { try { + if (codepage !== null && this.supportsCodePage()) { + try { + var contents = (WScript).ReadFile(path, codepage); + return new FileInformation(contents, 0 /* None */); + } catch (e) { + } + } + var streamObj = getStreamObject(); streamObj.Open(); streamObj.Type = 2; @@ -1304,7 +1321,14 @@ var Environment = (function () { currentDirectory: function () { return (process).cwd(); }, - readFile: function (file) { + supportsCodePage: function () { + return false; + }, + readFile: function (file, codepage) { + if (codepage !== null) { + throw new Error(TypeScript.getDiagnosticMessage(TypeScript.DiagnosticCode.codepage_option_not_supported_on_current_platform, null)); + } + var buffer = _fs.readFileSync(file); switch (buffer[0]) { case 0xFE: @@ -2986,7 +3010,15 @@ var TypeScript; "code": 5040, "category": 1 /* Error */ }, - "Concatenate and emit output to single file": { + "Option '{0}' specified without '{1}'": { + "code": 5041, + "category": 1 /* Error */ + }, + "'codepage' option not supported on current platform.": { + "code": 5042, + "category": 1 /* Error */ + }, + "Concatenate and emit output to single file.": { "code": 6001, "category": 2 /* Message */ }, @@ -3050,7 +3082,7 @@ var TypeScript; "code": 6024, "category": 2 /* Message */ }, - "file": { + "file1": { "code": 6025, "category": 2 /* Message */ }, @@ -3086,7 +3118,7 @@ var TypeScript; "code": 6034, "category": 2 /* Message */ }, - "FILE": { + "file2": { "code": 6035, "category": 2 /* Message */ }, @@ -3102,6 +3134,14 @@ var TypeScript; "code": 6038, "category": 2 /* Message */ }, + "NUMBER": { + "code": 6039, + "category": 2 /* Message */ + }, + "Specify the codepage to use when opening source files.": { + "code": 6040, + "category": 2 /* Message */ + }, "This version of the Javascript runtime does not support the '{0}' function.": { "code": 7000, "category": 1 /* Error */ @@ -3165,6 +3205,22 @@ var TypeScript; "Array Literal implicitly has an 'any' type from widening.": { "code": 7014, "category": 1 /* Error */ + }, + "Use of deprecated type 'bool'. Use 'boolean' instead.": { + "code": 7020, + "category": 0 /* Warning */ + }, + "'module(...)' is deprecated. Use 'require(...)' instead.": { + "code": 7021, + "category": 0 /* Warning */ + }, + "Allow 'bool' as a synonym for 'boolean'.": { + "code": 7022, + "category": 2 /* Message */ + }, + "Allow 'module(...)' as a synonym for 'require(...)'.": { + "code": 7022, + "category": 2 /* Message */ } }; })(TypeScript || (TypeScript = {})); @@ -4361,12 +4417,16 @@ var TypeScript; var TypeScript; (function (TypeScript) { var ParseOptions = (function () { - function ParseOptions(languageVersion, allowAutomaticSemicolonInsertion) { + function ParseOptions(languageVersion, allowAutomaticSemicolonInsertion, allowModuleKeywordInExternalModuleReference) { this._languageVersion = languageVersion; this._allowAutomaticSemicolonInsertion = allowAutomaticSemicolonInsertion; + this._allowModuleKeywordInExternalModuleReference = allowModuleKeywordInExternalModuleReference; } ParseOptions.prototype.toJSON = function (key) { - return { allowAutomaticSemicolonInsertion: this._allowAutomaticSemicolonInsertion }; + return { + allowAutomaticSemicolonInsertion: this._allowAutomaticSemicolonInsertion, + allowModuleKeywordInExternalModuleReference: this._allowModuleKeywordInExternalModuleReference + }; }; ParseOptions.prototype.languageVersion = function () { @@ -4376,6 +4436,10 @@ var TypeScript; ParseOptions.prototype.allowAutomaticSemicolonInsertion = function () { return this._allowAutomaticSemicolonInsertion; }; + + ParseOptions.prototype.allowModuleKeywordInExternalModuleReference = function () { + return this._allowModuleKeywordInExternalModuleReference; + }; return ParseOptions; })(); TypeScript.ParseOptions = ParseOptions; @@ -4757,206 +4821,207 @@ var TypeScript; SyntaxKind[SyntaxKind["AnyKeyword"] = 60] = "AnyKeyword"; SyntaxKind[SyntaxKind["BooleanKeyword"] = 61] = "BooleanKeyword"; - SyntaxKind[SyntaxKind["ConstructorKeyword"] = 62] = "ConstructorKeyword"; - SyntaxKind[SyntaxKind["DeclareKeyword"] = 63] = "DeclareKeyword"; - SyntaxKind[SyntaxKind["GetKeyword"] = 64] = "GetKeyword"; - SyntaxKind[SyntaxKind["ModuleKeyword"] = 65] = "ModuleKeyword"; - SyntaxKind[SyntaxKind["RequireKeyword"] = 66] = "RequireKeyword"; - SyntaxKind[SyntaxKind["NumberKeyword"] = 67] = "NumberKeyword"; - SyntaxKind[SyntaxKind["SetKeyword"] = 68] = "SetKeyword"; - SyntaxKind[SyntaxKind["StringKeyword"] = 69] = "StringKeyword"; + SyntaxKind[SyntaxKind["BoolKeyword"] = 62] = "BoolKeyword"; + SyntaxKind[SyntaxKind["ConstructorKeyword"] = 63] = "ConstructorKeyword"; + SyntaxKind[SyntaxKind["DeclareKeyword"] = 64] = "DeclareKeyword"; + SyntaxKind[SyntaxKind["GetKeyword"] = 65] = "GetKeyword"; + SyntaxKind[SyntaxKind["ModuleKeyword"] = 66] = "ModuleKeyword"; + SyntaxKind[SyntaxKind["RequireKeyword"] = 67] = "RequireKeyword"; + SyntaxKind[SyntaxKind["NumberKeyword"] = 68] = "NumberKeyword"; + SyntaxKind[SyntaxKind["SetKeyword"] = 69] = "SetKeyword"; + SyntaxKind[SyntaxKind["StringKeyword"] = 70] = "StringKeyword"; - SyntaxKind[SyntaxKind["OpenBraceToken"] = 70] = "OpenBraceToken"; - SyntaxKind[SyntaxKind["CloseBraceToken"] = 71] = "CloseBraceToken"; - SyntaxKind[SyntaxKind["OpenParenToken"] = 72] = "OpenParenToken"; - SyntaxKind[SyntaxKind["CloseParenToken"] = 73] = "CloseParenToken"; - SyntaxKind[SyntaxKind["OpenBracketToken"] = 74] = "OpenBracketToken"; - SyntaxKind[SyntaxKind["CloseBracketToken"] = 75] = "CloseBracketToken"; - SyntaxKind[SyntaxKind["DotToken"] = 76] = "DotToken"; - SyntaxKind[SyntaxKind["DotDotDotToken"] = 77] = "DotDotDotToken"; - SyntaxKind[SyntaxKind["SemicolonToken"] = 78] = "SemicolonToken"; - SyntaxKind[SyntaxKind["CommaToken"] = 79] = "CommaToken"; - SyntaxKind[SyntaxKind["LessThanToken"] = 80] = "LessThanToken"; - SyntaxKind[SyntaxKind["GreaterThanToken"] = 81] = "GreaterThanToken"; - SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 82] = "LessThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 83] = "GreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 84] = "EqualsEqualsToken"; - SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 85] = "EqualsGreaterThanToken"; - SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 86] = "ExclamationEqualsToken"; - SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 87] = "EqualsEqualsEqualsToken"; - SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 88] = "ExclamationEqualsEqualsToken"; - SyntaxKind[SyntaxKind["PlusToken"] = 89] = "PlusToken"; - SyntaxKind[SyntaxKind["MinusToken"] = 90] = "MinusToken"; - SyntaxKind[SyntaxKind["AsteriskToken"] = 91] = "AsteriskToken"; - SyntaxKind[SyntaxKind["PercentToken"] = 92] = "PercentToken"; - SyntaxKind[SyntaxKind["PlusPlusToken"] = 93] = "PlusPlusToken"; - SyntaxKind[SyntaxKind["MinusMinusToken"] = 94] = "MinusMinusToken"; - SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 95] = "LessThanLessThanToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 96] = "GreaterThanGreaterThanToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 97] = "GreaterThanGreaterThanGreaterThanToken"; - SyntaxKind[SyntaxKind["AmpersandToken"] = 98] = "AmpersandToken"; - SyntaxKind[SyntaxKind["BarToken"] = 99] = "BarToken"; - SyntaxKind[SyntaxKind["CaretToken"] = 100] = "CaretToken"; - SyntaxKind[SyntaxKind["ExclamationToken"] = 101] = "ExclamationToken"; - SyntaxKind[SyntaxKind["TildeToken"] = 102] = "TildeToken"; - SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 103] = "AmpersandAmpersandToken"; - SyntaxKind[SyntaxKind["BarBarToken"] = 104] = "BarBarToken"; - SyntaxKind[SyntaxKind["QuestionToken"] = 105] = "QuestionToken"; - SyntaxKind[SyntaxKind["ColonToken"] = 106] = "ColonToken"; - SyntaxKind[SyntaxKind["EqualsToken"] = 107] = "EqualsToken"; - SyntaxKind[SyntaxKind["PlusEqualsToken"] = 108] = "PlusEqualsToken"; - SyntaxKind[SyntaxKind["MinusEqualsToken"] = 109] = "MinusEqualsToken"; - SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 110] = "AsteriskEqualsToken"; - SyntaxKind[SyntaxKind["PercentEqualsToken"] = 111] = "PercentEqualsToken"; - SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 112] = "LessThanLessThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 113] = "GreaterThanGreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 114] = "GreaterThanGreaterThanGreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 115] = "AmpersandEqualsToken"; - SyntaxKind[SyntaxKind["BarEqualsToken"] = 116] = "BarEqualsToken"; - SyntaxKind[SyntaxKind["CaretEqualsToken"] = 117] = "CaretEqualsToken"; - SyntaxKind[SyntaxKind["SlashToken"] = 118] = "SlashToken"; - SyntaxKind[SyntaxKind["SlashEqualsToken"] = 119] = "SlashEqualsToken"; + SyntaxKind[SyntaxKind["OpenBraceToken"] = 71] = "OpenBraceToken"; + SyntaxKind[SyntaxKind["CloseBraceToken"] = 72] = "CloseBraceToken"; + SyntaxKind[SyntaxKind["OpenParenToken"] = 73] = "OpenParenToken"; + SyntaxKind[SyntaxKind["CloseParenToken"] = 74] = "CloseParenToken"; + SyntaxKind[SyntaxKind["OpenBracketToken"] = 75] = "OpenBracketToken"; + SyntaxKind[SyntaxKind["CloseBracketToken"] = 76] = "CloseBracketToken"; + SyntaxKind[SyntaxKind["DotToken"] = 77] = "DotToken"; + SyntaxKind[SyntaxKind["DotDotDotToken"] = 78] = "DotDotDotToken"; + SyntaxKind[SyntaxKind["SemicolonToken"] = 79] = "SemicolonToken"; + SyntaxKind[SyntaxKind["CommaToken"] = 80] = "CommaToken"; + SyntaxKind[SyntaxKind["LessThanToken"] = 81] = "LessThanToken"; + SyntaxKind[SyntaxKind["GreaterThanToken"] = 82] = "GreaterThanToken"; + SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 83] = "LessThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 84] = "GreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 85] = "EqualsEqualsToken"; + SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 86] = "EqualsGreaterThanToken"; + SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 87] = "ExclamationEqualsToken"; + SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 88] = "EqualsEqualsEqualsToken"; + SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 89] = "ExclamationEqualsEqualsToken"; + SyntaxKind[SyntaxKind["PlusToken"] = 90] = "PlusToken"; + SyntaxKind[SyntaxKind["MinusToken"] = 91] = "MinusToken"; + SyntaxKind[SyntaxKind["AsteriskToken"] = 92] = "AsteriskToken"; + SyntaxKind[SyntaxKind["PercentToken"] = 93] = "PercentToken"; + SyntaxKind[SyntaxKind["PlusPlusToken"] = 94] = "PlusPlusToken"; + SyntaxKind[SyntaxKind["MinusMinusToken"] = 95] = "MinusMinusToken"; + SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 96] = "LessThanLessThanToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 97] = "GreaterThanGreaterThanToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 98] = "GreaterThanGreaterThanGreaterThanToken"; + SyntaxKind[SyntaxKind["AmpersandToken"] = 99] = "AmpersandToken"; + SyntaxKind[SyntaxKind["BarToken"] = 100] = "BarToken"; + SyntaxKind[SyntaxKind["CaretToken"] = 101] = "CaretToken"; + SyntaxKind[SyntaxKind["ExclamationToken"] = 102] = "ExclamationToken"; + SyntaxKind[SyntaxKind["TildeToken"] = 103] = "TildeToken"; + SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 104] = "AmpersandAmpersandToken"; + SyntaxKind[SyntaxKind["BarBarToken"] = 105] = "BarBarToken"; + SyntaxKind[SyntaxKind["QuestionToken"] = 106] = "QuestionToken"; + SyntaxKind[SyntaxKind["ColonToken"] = 107] = "ColonToken"; + SyntaxKind[SyntaxKind["EqualsToken"] = 108] = "EqualsToken"; + SyntaxKind[SyntaxKind["PlusEqualsToken"] = 109] = "PlusEqualsToken"; + SyntaxKind[SyntaxKind["MinusEqualsToken"] = 110] = "MinusEqualsToken"; + SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 111] = "AsteriskEqualsToken"; + SyntaxKind[SyntaxKind["PercentEqualsToken"] = 112] = "PercentEqualsToken"; + SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 113] = "LessThanLessThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 114] = "GreaterThanGreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 115] = "GreaterThanGreaterThanGreaterThanEqualsToken"; + SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 116] = "AmpersandEqualsToken"; + SyntaxKind[SyntaxKind["BarEqualsToken"] = 117] = "BarEqualsToken"; + SyntaxKind[SyntaxKind["CaretEqualsToken"] = 118] = "CaretEqualsToken"; + SyntaxKind[SyntaxKind["SlashToken"] = 119] = "SlashToken"; + SyntaxKind[SyntaxKind["SlashEqualsToken"] = 120] = "SlashEqualsToken"; - SyntaxKind[SyntaxKind["SourceUnit"] = 120] = "SourceUnit"; + SyntaxKind[SyntaxKind["SourceUnit"] = 121] = "SourceUnit"; - SyntaxKind[SyntaxKind["QualifiedName"] = 121] = "QualifiedName"; + SyntaxKind[SyntaxKind["QualifiedName"] = 122] = "QualifiedName"; - SyntaxKind[SyntaxKind["ObjectType"] = 122] = "ObjectType"; - SyntaxKind[SyntaxKind["FunctionType"] = 123] = "FunctionType"; - SyntaxKind[SyntaxKind["ArrayType"] = 124] = "ArrayType"; - SyntaxKind[SyntaxKind["ConstructorType"] = 125] = "ConstructorType"; - SyntaxKind[SyntaxKind["GenericType"] = 126] = "GenericType"; - SyntaxKind[SyntaxKind["TypeQuery"] = 127] = "TypeQuery"; + SyntaxKind[SyntaxKind["ObjectType"] = 123] = "ObjectType"; + SyntaxKind[SyntaxKind["FunctionType"] = 124] = "FunctionType"; + SyntaxKind[SyntaxKind["ArrayType"] = 125] = "ArrayType"; + SyntaxKind[SyntaxKind["ConstructorType"] = 126] = "ConstructorType"; + SyntaxKind[SyntaxKind["GenericType"] = 127] = "GenericType"; + SyntaxKind[SyntaxKind["TypeQuery"] = 128] = "TypeQuery"; - SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 128] = "InterfaceDeclaration"; - SyntaxKind[SyntaxKind["FunctionDeclaration"] = 129] = "FunctionDeclaration"; - SyntaxKind[SyntaxKind["ModuleDeclaration"] = 130] = "ModuleDeclaration"; - SyntaxKind[SyntaxKind["ClassDeclaration"] = 131] = "ClassDeclaration"; - SyntaxKind[SyntaxKind["EnumDeclaration"] = 132] = "EnumDeclaration"; - SyntaxKind[SyntaxKind["ImportDeclaration"] = 133] = "ImportDeclaration"; - SyntaxKind[SyntaxKind["ExportAssignment"] = 134] = "ExportAssignment"; + SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 129] = "InterfaceDeclaration"; + SyntaxKind[SyntaxKind["FunctionDeclaration"] = 130] = "FunctionDeclaration"; + SyntaxKind[SyntaxKind["ModuleDeclaration"] = 131] = "ModuleDeclaration"; + SyntaxKind[SyntaxKind["ClassDeclaration"] = 132] = "ClassDeclaration"; + SyntaxKind[SyntaxKind["EnumDeclaration"] = 133] = "EnumDeclaration"; + SyntaxKind[SyntaxKind["ImportDeclaration"] = 134] = "ImportDeclaration"; + SyntaxKind[SyntaxKind["ExportAssignment"] = 135] = "ExportAssignment"; - SyntaxKind[SyntaxKind["MemberFunctionDeclaration"] = 135] = "MemberFunctionDeclaration"; - SyntaxKind[SyntaxKind["MemberVariableDeclaration"] = 136] = "MemberVariableDeclaration"; - SyntaxKind[SyntaxKind["ConstructorDeclaration"] = 137] = "ConstructorDeclaration"; - SyntaxKind[SyntaxKind["GetMemberAccessorDeclaration"] = 138] = "GetMemberAccessorDeclaration"; - SyntaxKind[SyntaxKind["SetMemberAccessorDeclaration"] = 139] = "SetMemberAccessorDeclaration"; + SyntaxKind[SyntaxKind["MemberFunctionDeclaration"] = 136] = "MemberFunctionDeclaration"; + SyntaxKind[SyntaxKind["MemberVariableDeclaration"] = 137] = "MemberVariableDeclaration"; + SyntaxKind[SyntaxKind["ConstructorDeclaration"] = 138] = "ConstructorDeclaration"; + SyntaxKind[SyntaxKind["GetMemberAccessorDeclaration"] = 139] = "GetMemberAccessorDeclaration"; + SyntaxKind[SyntaxKind["SetMemberAccessorDeclaration"] = 140] = "SetMemberAccessorDeclaration"; - SyntaxKind[SyntaxKind["PropertySignature"] = 140] = "PropertySignature"; - SyntaxKind[SyntaxKind["CallSignature"] = 141] = "CallSignature"; - SyntaxKind[SyntaxKind["ConstructSignature"] = 142] = "ConstructSignature"; - SyntaxKind[SyntaxKind["IndexSignature"] = 143] = "IndexSignature"; - SyntaxKind[SyntaxKind["MethodSignature"] = 144] = "MethodSignature"; + SyntaxKind[SyntaxKind["PropertySignature"] = 141] = "PropertySignature"; + SyntaxKind[SyntaxKind["CallSignature"] = 142] = "CallSignature"; + SyntaxKind[SyntaxKind["ConstructSignature"] = 143] = "ConstructSignature"; + SyntaxKind[SyntaxKind["IndexSignature"] = 144] = "IndexSignature"; + SyntaxKind[SyntaxKind["MethodSignature"] = 145] = "MethodSignature"; - SyntaxKind[SyntaxKind["Block"] = 145] = "Block"; - SyntaxKind[SyntaxKind["IfStatement"] = 146] = "IfStatement"; - SyntaxKind[SyntaxKind["VariableStatement"] = 147] = "VariableStatement"; - SyntaxKind[SyntaxKind["ExpressionStatement"] = 148] = "ExpressionStatement"; - SyntaxKind[SyntaxKind["ReturnStatement"] = 149] = "ReturnStatement"; - SyntaxKind[SyntaxKind["SwitchStatement"] = 150] = "SwitchStatement"; - SyntaxKind[SyntaxKind["BreakStatement"] = 151] = "BreakStatement"; - SyntaxKind[SyntaxKind["ContinueStatement"] = 152] = "ContinueStatement"; - SyntaxKind[SyntaxKind["ForStatement"] = 153] = "ForStatement"; - SyntaxKind[SyntaxKind["ForInStatement"] = 154] = "ForInStatement"; - SyntaxKind[SyntaxKind["EmptyStatement"] = 155] = "EmptyStatement"; - SyntaxKind[SyntaxKind["ThrowStatement"] = 156] = "ThrowStatement"; - SyntaxKind[SyntaxKind["WhileStatement"] = 157] = "WhileStatement"; - SyntaxKind[SyntaxKind["TryStatement"] = 158] = "TryStatement"; - SyntaxKind[SyntaxKind["LabeledStatement"] = 159] = "LabeledStatement"; - SyntaxKind[SyntaxKind["DoStatement"] = 160] = "DoStatement"; - SyntaxKind[SyntaxKind["DebuggerStatement"] = 161] = "DebuggerStatement"; - SyntaxKind[SyntaxKind["WithStatement"] = 162] = "WithStatement"; + SyntaxKind[SyntaxKind["Block"] = 146] = "Block"; + SyntaxKind[SyntaxKind["IfStatement"] = 147] = "IfStatement"; + SyntaxKind[SyntaxKind["VariableStatement"] = 148] = "VariableStatement"; + SyntaxKind[SyntaxKind["ExpressionStatement"] = 149] = "ExpressionStatement"; + SyntaxKind[SyntaxKind["ReturnStatement"] = 150] = "ReturnStatement"; + SyntaxKind[SyntaxKind["SwitchStatement"] = 151] = "SwitchStatement"; + SyntaxKind[SyntaxKind["BreakStatement"] = 152] = "BreakStatement"; + SyntaxKind[SyntaxKind["ContinueStatement"] = 153] = "ContinueStatement"; + SyntaxKind[SyntaxKind["ForStatement"] = 154] = "ForStatement"; + SyntaxKind[SyntaxKind["ForInStatement"] = 155] = "ForInStatement"; + SyntaxKind[SyntaxKind["EmptyStatement"] = 156] = "EmptyStatement"; + SyntaxKind[SyntaxKind["ThrowStatement"] = 157] = "ThrowStatement"; + SyntaxKind[SyntaxKind["WhileStatement"] = 158] = "WhileStatement"; + SyntaxKind[SyntaxKind["TryStatement"] = 159] = "TryStatement"; + SyntaxKind[SyntaxKind["LabeledStatement"] = 160] = "LabeledStatement"; + SyntaxKind[SyntaxKind["DoStatement"] = 161] = "DoStatement"; + SyntaxKind[SyntaxKind["DebuggerStatement"] = 162] = "DebuggerStatement"; + SyntaxKind[SyntaxKind["WithStatement"] = 163] = "WithStatement"; - SyntaxKind[SyntaxKind["PlusExpression"] = 163] = "PlusExpression"; - SyntaxKind[SyntaxKind["NegateExpression"] = 164] = "NegateExpression"; - SyntaxKind[SyntaxKind["BitwiseNotExpression"] = 165] = "BitwiseNotExpression"; - SyntaxKind[SyntaxKind["LogicalNotExpression"] = 166] = "LogicalNotExpression"; - SyntaxKind[SyntaxKind["PreIncrementExpression"] = 167] = "PreIncrementExpression"; - SyntaxKind[SyntaxKind["PreDecrementExpression"] = 168] = "PreDecrementExpression"; - SyntaxKind[SyntaxKind["DeleteExpression"] = 169] = "DeleteExpression"; - SyntaxKind[SyntaxKind["TypeOfExpression"] = 170] = "TypeOfExpression"; - SyntaxKind[SyntaxKind["VoidExpression"] = 171] = "VoidExpression"; - SyntaxKind[SyntaxKind["CommaExpression"] = 172] = "CommaExpression"; - SyntaxKind[SyntaxKind["AssignmentExpression"] = 173] = "AssignmentExpression"; - SyntaxKind[SyntaxKind["AddAssignmentExpression"] = 174] = "AddAssignmentExpression"; - SyntaxKind[SyntaxKind["SubtractAssignmentExpression"] = 175] = "SubtractAssignmentExpression"; - SyntaxKind[SyntaxKind["MultiplyAssignmentExpression"] = 176] = "MultiplyAssignmentExpression"; - SyntaxKind[SyntaxKind["DivideAssignmentExpression"] = 177] = "DivideAssignmentExpression"; - SyntaxKind[SyntaxKind["ModuloAssignmentExpression"] = 178] = "ModuloAssignmentExpression"; - SyntaxKind[SyntaxKind["AndAssignmentExpression"] = 179] = "AndAssignmentExpression"; - SyntaxKind[SyntaxKind["ExclusiveOrAssignmentExpression"] = 180] = "ExclusiveOrAssignmentExpression"; - SyntaxKind[SyntaxKind["OrAssignmentExpression"] = 181] = "OrAssignmentExpression"; - SyntaxKind[SyntaxKind["LeftShiftAssignmentExpression"] = 182] = "LeftShiftAssignmentExpression"; - SyntaxKind[SyntaxKind["SignedRightShiftAssignmentExpression"] = 183] = "SignedRightShiftAssignmentExpression"; - SyntaxKind[SyntaxKind["UnsignedRightShiftAssignmentExpression"] = 184] = "UnsignedRightShiftAssignmentExpression"; - SyntaxKind[SyntaxKind["ConditionalExpression"] = 185] = "ConditionalExpression"; - SyntaxKind[SyntaxKind["LogicalOrExpression"] = 186] = "LogicalOrExpression"; - SyntaxKind[SyntaxKind["LogicalAndExpression"] = 187] = "LogicalAndExpression"; - SyntaxKind[SyntaxKind["BitwiseOrExpression"] = 188] = "BitwiseOrExpression"; - SyntaxKind[SyntaxKind["BitwiseExclusiveOrExpression"] = 189] = "BitwiseExclusiveOrExpression"; - SyntaxKind[SyntaxKind["BitwiseAndExpression"] = 190] = "BitwiseAndExpression"; - SyntaxKind[SyntaxKind["EqualsWithTypeConversionExpression"] = 191] = "EqualsWithTypeConversionExpression"; - SyntaxKind[SyntaxKind["NotEqualsWithTypeConversionExpression"] = 192] = "NotEqualsWithTypeConversionExpression"; - SyntaxKind[SyntaxKind["EqualsExpression"] = 193] = "EqualsExpression"; - SyntaxKind[SyntaxKind["NotEqualsExpression"] = 194] = "NotEqualsExpression"; - SyntaxKind[SyntaxKind["LessThanExpression"] = 195] = "LessThanExpression"; - SyntaxKind[SyntaxKind["GreaterThanExpression"] = 196] = "GreaterThanExpression"; - SyntaxKind[SyntaxKind["LessThanOrEqualExpression"] = 197] = "LessThanOrEqualExpression"; - SyntaxKind[SyntaxKind["GreaterThanOrEqualExpression"] = 198] = "GreaterThanOrEqualExpression"; - SyntaxKind[SyntaxKind["InstanceOfExpression"] = 199] = "InstanceOfExpression"; - SyntaxKind[SyntaxKind["InExpression"] = 200] = "InExpression"; - SyntaxKind[SyntaxKind["LeftShiftExpression"] = 201] = "LeftShiftExpression"; - SyntaxKind[SyntaxKind["SignedRightShiftExpression"] = 202] = "SignedRightShiftExpression"; - SyntaxKind[SyntaxKind["UnsignedRightShiftExpression"] = 203] = "UnsignedRightShiftExpression"; - SyntaxKind[SyntaxKind["MultiplyExpression"] = 204] = "MultiplyExpression"; - SyntaxKind[SyntaxKind["DivideExpression"] = 205] = "DivideExpression"; - SyntaxKind[SyntaxKind["ModuloExpression"] = 206] = "ModuloExpression"; - SyntaxKind[SyntaxKind["AddExpression"] = 207] = "AddExpression"; - SyntaxKind[SyntaxKind["SubtractExpression"] = 208] = "SubtractExpression"; - SyntaxKind[SyntaxKind["PostIncrementExpression"] = 209] = "PostIncrementExpression"; - SyntaxKind[SyntaxKind["PostDecrementExpression"] = 210] = "PostDecrementExpression"; - SyntaxKind[SyntaxKind["MemberAccessExpression"] = 211] = "MemberAccessExpression"; - SyntaxKind[SyntaxKind["InvocationExpression"] = 212] = "InvocationExpression"; - SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 213] = "ArrayLiteralExpression"; - SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 214] = "ObjectLiteralExpression"; - SyntaxKind[SyntaxKind["ObjectCreationExpression"] = 215] = "ObjectCreationExpression"; - SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 216] = "ParenthesizedExpression"; - SyntaxKind[SyntaxKind["ParenthesizedArrowFunctionExpression"] = 217] = "ParenthesizedArrowFunctionExpression"; - SyntaxKind[SyntaxKind["SimpleArrowFunctionExpression"] = 218] = "SimpleArrowFunctionExpression"; - SyntaxKind[SyntaxKind["CastExpression"] = 219] = "CastExpression"; - SyntaxKind[SyntaxKind["ElementAccessExpression"] = 220] = "ElementAccessExpression"; - SyntaxKind[SyntaxKind["FunctionExpression"] = 221] = "FunctionExpression"; - SyntaxKind[SyntaxKind["OmittedExpression"] = 222] = "OmittedExpression"; + SyntaxKind[SyntaxKind["PlusExpression"] = 164] = "PlusExpression"; + SyntaxKind[SyntaxKind["NegateExpression"] = 165] = "NegateExpression"; + SyntaxKind[SyntaxKind["BitwiseNotExpression"] = 166] = "BitwiseNotExpression"; + SyntaxKind[SyntaxKind["LogicalNotExpression"] = 167] = "LogicalNotExpression"; + SyntaxKind[SyntaxKind["PreIncrementExpression"] = 168] = "PreIncrementExpression"; + SyntaxKind[SyntaxKind["PreDecrementExpression"] = 169] = "PreDecrementExpression"; + SyntaxKind[SyntaxKind["DeleteExpression"] = 170] = "DeleteExpression"; + SyntaxKind[SyntaxKind["TypeOfExpression"] = 171] = "TypeOfExpression"; + SyntaxKind[SyntaxKind["VoidExpression"] = 172] = "VoidExpression"; + SyntaxKind[SyntaxKind["CommaExpression"] = 173] = "CommaExpression"; + SyntaxKind[SyntaxKind["AssignmentExpression"] = 174] = "AssignmentExpression"; + SyntaxKind[SyntaxKind["AddAssignmentExpression"] = 175] = "AddAssignmentExpression"; + SyntaxKind[SyntaxKind["SubtractAssignmentExpression"] = 176] = "SubtractAssignmentExpression"; + SyntaxKind[SyntaxKind["MultiplyAssignmentExpression"] = 177] = "MultiplyAssignmentExpression"; + SyntaxKind[SyntaxKind["DivideAssignmentExpression"] = 178] = "DivideAssignmentExpression"; + SyntaxKind[SyntaxKind["ModuloAssignmentExpression"] = 179] = "ModuloAssignmentExpression"; + SyntaxKind[SyntaxKind["AndAssignmentExpression"] = 180] = "AndAssignmentExpression"; + SyntaxKind[SyntaxKind["ExclusiveOrAssignmentExpression"] = 181] = "ExclusiveOrAssignmentExpression"; + SyntaxKind[SyntaxKind["OrAssignmentExpression"] = 182] = "OrAssignmentExpression"; + SyntaxKind[SyntaxKind["LeftShiftAssignmentExpression"] = 183] = "LeftShiftAssignmentExpression"; + SyntaxKind[SyntaxKind["SignedRightShiftAssignmentExpression"] = 184] = "SignedRightShiftAssignmentExpression"; + SyntaxKind[SyntaxKind["UnsignedRightShiftAssignmentExpression"] = 185] = "UnsignedRightShiftAssignmentExpression"; + SyntaxKind[SyntaxKind["ConditionalExpression"] = 186] = "ConditionalExpression"; + SyntaxKind[SyntaxKind["LogicalOrExpression"] = 187] = "LogicalOrExpression"; + SyntaxKind[SyntaxKind["LogicalAndExpression"] = 188] = "LogicalAndExpression"; + SyntaxKind[SyntaxKind["BitwiseOrExpression"] = 189] = "BitwiseOrExpression"; + SyntaxKind[SyntaxKind["BitwiseExclusiveOrExpression"] = 190] = "BitwiseExclusiveOrExpression"; + SyntaxKind[SyntaxKind["BitwiseAndExpression"] = 191] = "BitwiseAndExpression"; + SyntaxKind[SyntaxKind["EqualsWithTypeConversionExpression"] = 192] = "EqualsWithTypeConversionExpression"; + SyntaxKind[SyntaxKind["NotEqualsWithTypeConversionExpression"] = 193] = "NotEqualsWithTypeConversionExpression"; + SyntaxKind[SyntaxKind["EqualsExpression"] = 194] = "EqualsExpression"; + SyntaxKind[SyntaxKind["NotEqualsExpression"] = 195] = "NotEqualsExpression"; + SyntaxKind[SyntaxKind["LessThanExpression"] = 196] = "LessThanExpression"; + SyntaxKind[SyntaxKind["GreaterThanExpression"] = 197] = "GreaterThanExpression"; + SyntaxKind[SyntaxKind["LessThanOrEqualExpression"] = 198] = "LessThanOrEqualExpression"; + SyntaxKind[SyntaxKind["GreaterThanOrEqualExpression"] = 199] = "GreaterThanOrEqualExpression"; + SyntaxKind[SyntaxKind["InstanceOfExpression"] = 200] = "InstanceOfExpression"; + SyntaxKind[SyntaxKind["InExpression"] = 201] = "InExpression"; + SyntaxKind[SyntaxKind["LeftShiftExpression"] = 202] = "LeftShiftExpression"; + SyntaxKind[SyntaxKind["SignedRightShiftExpression"] = 203] = "SignedRightShiftExpression"; + SyntaxKind[SyntaxKind["UnsignedRightShiftExpression"] = 204] = "UnsignedRightShiftExpression"; + SyntaxKind[SyntaxKind["MultiplyExpression"] = 205] = "MultiplyExpression"; + SyntaxKind[SyntaxKind["DivideExpression"] = 206] = "DivideExpression"; + SyntaxKind[SyntaxKind["ModuloExpression"] = 207] = "ModuloExpression"; + SyntaxKind[SyntaxKind["AddExpression"] = 208] = "AddExpression"; + SyntaxKind[SyntaxKind["SubtractExpression"] = 209] = "SubtractExpression"; + SyntaxKind[SyntaxKind["PostIncrementExpression"] = 210] = "PostIncrementExpression"; + SyntaxKind[SyntaxKind["PostDecrementExpression"] = 211] = "PostDecrementExpression"; + SyntaxKind[SyntaxKind["MemberAccessExpression"] = 212] = "MemberAccessExpression"; + SyntaxKind[SyntaxKind["InvocationExpression"] = 213] = "InvocationExpression"; + SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 214] = "ArrayLiteralExpression"; + SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 215] = "ObjectLiteralExpression"; + SyntaxKind[SyntaxKind["ObjectCreationExpression"] = 216] = "ObjectCreationExpression"; + SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 217] = "ParenthesizedExpression"; + SyntaxKind[SyntaxKind["ParenthesizedArrowFunctionExpression"] = 218] = "ParenthesizedArrowFunctionExpression"; + SyntaxKind[SyntaxKind["SimpleArrowFunctionExpression"] = 219] = "SimpleArrowFunctionExpression"; + SyntaxKind[SyntaxKind["CastExpression"] = 220] = "CastExpression"; + SyntaxKind[SyntaxKind["ElementAccessExpression"] = 221] = "ElementAccessExpression"; + SyntaxKind[SyntaxKind["FunctionExpression"] = 222] = "FunctionExpression"; + SyntaxKind[SyntaxKind["OmittedExpression"] = 223] = "OmittedExpression"; - SyntaxKind[SyntaxKind["VariableDeclaration"] = 223] = "VariableDeclaration"; - SyntaxKind[SyntaxKind["VariableDeclarator"] = 224] = "VariableDeclarator"; + SyntaxKind[SyntaxKind["VariableDeclaration"] = 224] = "VariableDeclaration"; + SyntaxKind[SyntaxKind["VariableDeclarator"] = 225] = "VariableDeclarator"; - SyntaxKind[SyntaxKind["ArgumentList"] = 225] = "ArgumentList"; - SyntaxKind[SyntaxKind["ParameterList"] = 226] = "ParameterList"; - SyntaxKind[SyntaxKind["TypeArgumentList"] = 227] = "TypeArgumentList"; - SyntaxKind[SyntaxKind["TypeParameterList"] = 228] = "TypeParameterList"; + SyntaxKind[SyntaxKind["ArgumentList"] = 226] = "ArgumentList"; + SyntaxKind[SyntaxKind["ParameterList"] = 227] = "ParameterList"; + SyntaxKind[SyntaxKind["TypeArgumentList"] = 228] = "TypeArgumentList"; + SyntaxKind[SyntaxKind["TypeParameterList"] = 229] = "TypeParameterList"; - SyntaxKind[SyntaxKind["HeritageClause"] = 229] = "HeritageClause"; - SyntaxKind[SyntaxKind["EqualsValueClause"] = 230] = "EqualsValueClause"; - SyntaxKind[SyntaxKind["CaseSwitchClause"] = 231] = "CaseSwitchClause"; - SyntaxKind[SyntaxKind["DefaultSwitchClause"] = 232] = "DefaultSwitchClause"; - SyntaxKind[SyntaxKind["ElseClause"] = 233] = "ElseClause"; - SyntaxKind[SyntaxKind["CatchClause"] = 234] = "CatchClause"; - SyntaxKind[SyntaxKind["FinallyClause"] = 235] = "FinallyClause"; + SyntaxKind[SyntaxKind["HeritageClause"] = 230] = "HeritageClause"; + SyntaxKind[SyntaxKind["EqualsValueClause"] = 231] = "EqualsValueClause"; + SyntaxKind[SyntaxKind["CaseSwitchClause"] = 232] = "CaseSwitchClause"; + SyntaxKind[SyntaxKind["DefaultSwitchClause"] = 233] = "DefaultSwitchClause"; + SyntaxKind[SyntaxKind["ElseClause"] = 234] = "ElseClause"; + SyntaxKind[SyntaxKind["CatchClause"] = 235] = "CatchClause"; + SyntaxKind[SyntaxKind["FinallyClause"] = 236] = "FinallyClause"; - SyntaxKind[SyntaxKind["TypeParameter"] = 236] = "TypeParameter"; - SyntaxKind[SyntaxKind["Constraint"] = 237] = "Constraint"; + SyntaxKind[SyntaxKind["TypeParameter"] = 237] = "TypeParameter"; + SyntaxKind[SyntaxKind["Constraint"] = 238] = "Constraint"; - SyntaxKind[SyntaxKind["SimplePropertyAssignment"] = 238] = "SimplePropertyAssignment"; - SyntaxKind[SyntaxKind["GetAccessorPropertyAssignment"] = 239] = "GetAccessorPropertyAssignment"; - SyntaxKind[SyntaxKind["SetAccessorPropertyAssignment"] = 240] = "SetAccessorPropertyAssignment"; - SyntaxKind[SyntaxKind["FunctionPropertyAssignment"] = 241] = "FunctionPropertyAssignment"; + SyntaxKind[SyntaxKind["SimplePropertyAssignment"] = 239] = "SimplePropertyAssignment"; + SyntaxKind[SyntaxKind["GetAccessorPropertyAssignment"] = 240] = "GetAccessorPropertyAssignment"; + SyntaxKind[SyntaxKind["SetAccessorPropertyAssignment"] = 241] = "SetAccessorPropertyAssignment"; + SyntaxKind[SyntaxKind["FunctionPropertyAssignment"] = 242] = "FunctionPropertyAssignment"; - SyntaxKind[SyntaxKind["Parameter"] = 242] = "Parameter"; - SyntaxKind[SyntaxKind["EnumElement"] = 243] = "EnumElement"; - SyntaxKind[SyntaxKind["TypeAnnotation"] = 244] = "TypeAnnotation"; - SyntaxKind[SyntaxKind["ExternalModuleReference"] = 245] = "ExternalModuleReference"; - SyntaxKind[SyntaxKind["ModuleNameModuleReference"] = 246] = "ModuleNameModuleReference"; + SyntaxKind[SyntaxKind["Parameter"] = 243] = "Parameter"; + SyntaxKind[SyntaxKind["EnumElement"] = 244] = "EnumElement"; + SyntaxKind[SyntaxKind["TypeAnnotation"] = 245] = "TypeAnnotation"; + SyntaxKind[SyntaxKind["ExternalModuleReference"] = 246] = "ExternalModuleReference"; + SyntaxKind[SyntaxKind["ModuleNameModuleReference"] = 247] = "ModuleNameModuleReference"; SyntaxKind[SyntaxKind["FirstStandardKeyword"] = SyntaxKind.BreakKeyword] = "FirstStandardKeyword"; SyntaxKind[SyntaxKind["LastStandardKeyword"] = SyntaxKind.WithKeyword] = "LastStandardKeyword"; @@ -4989,6 +5054,7 @@ var TypeScript; (function (SyntaxFacts) { var textToKeywordKind = { "any": 60 /* AnyKeyword */, + "bool": 62 /* BoolKeyword */, "boolean": 61 /* BooleanKeyword */, "break": 15 /* BreakKeyword */, "case": 16 /* CaseKeyword */, @@ -4996,9 +5062,9 @@ var TypeScript; "class": 44 /* ClassKeyword */, "continue": 18 /* ContinueKeyword */, "const": 45 /* ConstKeyword */, - "constructor": 62 /* ConstructorKeyword */, + "constructor": 63 /* ConstructorKeyword */, "debugger": 19 /* DebuggerKeyword */, - "declare": 63 /* DeclareKeyword */, + "declare": 64 /* DeclareKeyword */, "default": 20 /* DefaultKeyword */, "delete": 21 /* DeleteKeyword */, "do": 22 /* DoKeyword */, @@ -5010,7 +5076,7 @@ var TypeScript; "finally": 25 /* FinallyKeyword */, "for": 26 /* ForKeyword */, "function": 27 /* FunctionKeyword */, - "get": 64 /* GetKeyword */, + "get": 65 /* GetKeyword */, "if": 28 /* IfKeyword */, "implements": 51 /* ImplementsKeyword */, "import": 49 /* ImportKeyword */, @@ -5018,19 +5084,19 @@ var TypeScript; "instanceof": 30 /* InstanceOfKeyword */, "interface": 52 /* InterfaceKeyword */, "let": 53 /* LetKeyword */, - "module": 65 /* ModuleKeyword */, + "module": 66 /* ModuleKeyword */, "new": 31 /* NewKeyword */, "null": 32 /* NullKeyword */, - "number": 67 /* NumberKeyword */, + "number": 68 /* NumberKeyword */, "package": 54 /* PackageKeyword */, "private": 55 /* PrivateKeyword */, "protected": 56 /* ProtectedKeyword */, "public": 57 /* PublicKeyword */, - "require": 66 /* RequireKeyword */, + "require": 67 /* RequireKeyword */, "return": 33 /* ReturnKeyword */, - "set": 68 /* SetKeyword */, + "set": 69 /* SetKeyword */, "static": 58 /* StaticKeyword */, - "string": 69 /* StringKeyword */, + "string": 70 /* StringKeyword */, "super": 50 /* SuperKeyword */, "switch": 34 /* SwitchKeyword */, "this": 35 /* ThisKeyword */, @@ -5043,56 +5109,56 @@ var TypeScript; "while": 42 /* WhileKeyword */, "with": 43 /* WithKeyword */, "yield": 59 /* YieldKeyword */, - "{": 70 /* OpenBraceToken */, - "}": 71 /* CloseBraceToken */, - "(": 72 /* OpenParenToken */, - ")": 73 /* CloseParenToken */, - "[": 74 /* OpenBracketToken */, - "]": 75 /* CloseBracketToken */, - ".": 76 /* DotToken */, - "...": 77 /* DotDotDotToken */, - ";": 78 /* SemicolonToken */, - ",": 79 /* CommaToken */, - "<": 80 /* LessThanToken */, - ">": 81 /* GreaterThanToken */, - "<=": 82 /* LessThanEqualsToken */, - ">=": 83 /* GreaterThanEqualsToken */, - "==": 84 /* EqualsEqualsToken */, - "=>": 85 /* EqualsGreaterThanToken */, - "!=": 86 /* ExclamationEqualsToken */, - "===": 87 /* EqualsEqualsEqualsToken */, - "!==": 88 /* ExclamationEqualsEqualsToken */, - "+": 89 /* PlusToken */, - "-": 90 /* MinusToken */, - "*": 91 /* AsteriskToken */, - "%": 92 /* PercentToken */, - "++": 93 /* PlusPlusToken */, - "--": 94 /* MinusMinusToken */, - "<<": 95 /* LessThanLessThanToken */, - ">>": 96 /* GreaterThanGreaterThanToken */, - ">>>": 97 /* GreaterThanGreaterThanGreaterThanToken */, - "&": 98 /* AmpersandToken */, - "|": 99 /* BarToken */, - "^": 100 /* CaretToken */, - "!": 101 /* ExclamationToken */, - "~": 102 /* TildeToken */, - "&&": 103 /* AmpersandAmpersandToken */, - "||": 104 /* BarBarToken */, - "?": 105 /* QuestionToken */, - ":": 106 /* ColonToken */, - "=": 107 /* EqualsToken */, - "+=": 108 /* PlusEqualsToken */, - "-=": 109 /* MinusEqualsToken */, - "*=": 110 /* AsteriskEqualsToken */, - "%=": 111 /* PercentEqualsToken */, - "<<=": 112 /* LessThanLessThanEqualsToken */, - ">>=": 113 /* GreaterThanGreaterThanEqualsToken */, - ">>>=": 114 /* GreaterThanGreaterThanGreaterThanEqualsToken */, - "&=": 115 /* AmpersandEqualsToken */, - "|=": 116 /* BarEqualsToken */, - "^=": 117 /* CaretEqualsToken */, - "/": 118 /* SlashToken */, - "/=": 119 /* SlashEqualsToken */ + "{": 71 /* OpenBraceToken */, + "}": 72 /* CloseBraceToken */, + "(": 73 /* OpenParenToken */, + ")": 74 /* CloseParenToken */, + "[": 75 /* OpenBracketToken */, + "]": 76 /* CloseBracketToken */, + ".": 77 /* DotToken */, + "...": 78 /* DotDotDotToken */, + ";": 79 /* SemicolonToken */, + ",": 80 /* CommaToken */, + "<": 81 /* LessThanToken */, + ">": 82 /* GreaterThanToken */, + "<=": 83 /* LessThanEqualsToken */, + ">=": 84 /* GreaterThanEqualsToken */, + "==": 85 /* EqualsEqualsToken */, + "=>": 86 /* EqualsGreaterThanToken */, + "!=": 87 /* ExclamationEqualsToken */, + "===": 88 /* EqualsEqualsEqualsToken */, + "!==": 89 /* ExclamationEqualsEqualsToken */, + "+": 90 /* PlusToken */, + "-": 91 /* MinusToken */, + "*": 92 /* AsteriskToken */, + "%": 93 /* PercentToken */, + "++": 94 /* PlusPlusToken */, + "--": 95 /* MinusMinusToken */, + "<<": 96 /* LessThanLessThanToken */, + ">>": 97 /* GreaterThanGreaterThanToken */, + ">>>": 98 /* GreaterThanGreaterThanGreaterThanToken */, + "&": 99 /* AmpersandToken */, + "|": 100 /* BarToken */, + "^": 101 /* CaretToken */, + "!": 102 /* ExclamationToken */, + "~": 103 /* TildeToken */, + "&&": 104 /* AmpersandAmpersandToken */, + "||": 105 /* BarBarToken */, + "?": 106 /* QuestionToken */, + ":": 107 /* ColonToken */, + "=": 108 /* EqualsToken */, + "+=": 109 /* PlusEqualsToken */, + "-=": 110 /* MinusEqualsToken */, + "*=": 111 /* AsteriskEqualsToken */, + "%=": 112 /* PercentEqualsToken */, + "<<=": 113 /* LessThanLessThanEqualsToken */, + ">>=": 114 /* GreaterThanGreaterThanEqualsToken */, + ">>>=": 115 /* GreaterThanGreaterThanGreaterThanEqualsToken */, + "&=": 116 /* AmpersandEqualsToken */, + "|=": 117 /* BarEqualsToken */, + "^=": 118 /* CaretEqualsToken */, + "/": 119 /* SlashToken */, + "/=": 120 /* SlashEqualsToken */ }; var kindToText = new Array(); @@ -5103,7 +5169,7 @@ var TypeScript; } } - kindToText[62 /* ConstructorKeyword */] = "constructor"; + kindToText[63 /* ConstructorKeyword */] = "constructor"; function getTokenKind(text) { if (textToKeywordKind.hasOwnProperty(text)) { @@ -5121,12 +5187,12 @@ var TypeScript; SyntaxFacts.getText = getText; function isTokenKind(kind) { - return kind >= 9 /* FirstToken */ && kind <= 119 /* LastToken */; + return kind >= 9 /* FirstToken */ && kind <= 120 /* LastToken */; } SyntaxFacts.isTokenKind = isTokenKind; function isAnyKeyword(kind) { - return kind >= 15 /* FirstKeyword */ && kind <= 69 /* LastKeyword */; + return kind >= 15 /* FirstKeyword */ && kind <= 70 /* LastKeyword */; } SyntaxFacts.isAnyKeyword = isAnyKeyword; @@ -5146,7 +5212,7 @@ var TypeScript; SyntaxFacts.isFutureReservedStrictKeyword = isFutureReservedStrictKeyword; function isAnyPunctuation(kind) { - return kind >= 70 /* FirstPunctuation */ && kind <= 119 /* LastPunctuation */; + return kind >= 71 /* FirstPunctuation */ && kind <= 120 /* LastPunctuation */; } SyntaxFacts.isAnyPunctuation = isAnyPunctuation; @@ -5162,18 +5228,18 @@ var TypeScript; function getPrefixUnaryExpressionFromOperatorToken(tokenKind) { switch (tokenKind) { - case 89 /* PlusToken */: - return 163 /* PlusExpression */; - case 90 /* MinusToken */: - return 164 /* NegateExpression */; - case 102 /* TildeToken */: - return 165 /* BitwiseNotExpression */; - case 101 /* ExclamationToken */: - return 166 /* LogicalNotExpression */; - case 93 /* PlusPlusToken */: - return 167 /* PreIncrementExpression */; - case 94 /* MinusMinusToken */: - return 168 /* PreDecrementExpression */; + case 90 /* PlusToken */: + return 164 /* PlusExpression */; + case 91 /* MinusToken */: + return 165 /* NegateExpression */; + case 103 /* TildeToken */: + return 166 /* BitwiseNotExpression */; + case 102 /* ExclamationToken */: + return 167 /* LogicalNotExpression */; + case 94 /* PlusPlusToken */: + return 168 /* PreIncrementExpression */; + case 95 /* MinusMinusToken */: + return 169 /* PreDecrementExpression */; default: return 0 /* None */; @@ -5183,10 +5249,10 @@ var TypeScript; function getPostfixUnaryExpressionFromOperatorToken(tokenKind) { switch (tokenKind) { - case 93 /* PlusPlusToken */: - return 209 /* PostIncrementExpression */; - case 94 /* MinusMinusToken */: - return 210 /* PostDecrementExpression */; + case 94 /* PlusPlusToken */: + return 210 /* PostIncrementExpression */; + case 95 /* MinusMinusToken */: + return 211 /* PostDecrementExpression */; default: return 0 /* None */; } @@ -5195,113 +5261,113 @@ var TypeScript; function getBinaryExpressionFromOperatorToken(tokenKind) { switch (tokenKind) { - case 91 /* AsteriskToken */: - return 204 /* MultiplyExpression */; + case 92 /* AsteriskToken */: + return 205 /* MultiplyExpression */; - case 118 /* SlashToken */: - return 205 /* DivideExpression */; + case 119 /* SlashToken */: + return 206 /* DivideExpression */; - case 92 /* PercentToken */: - return 206 /* ModuloExpression */; + case 93 /* PercentToken */: + return 207 /* ModuloExpression */; - case 89 /* PlusToken */: - return 207 /* AddExpression */; + case 90 /* PlusToken */: + return 208 /* AddExpression */; - case 90 /* MinusToken */: - return 208 /* SubtractExpression */; + case 91 /* MinusToken */: + return 209 /* SubtractExpression */; - case 95 /* LessThanLessThanToken */: - return 201 /* LeftShiftExpression */; + case 96 /* LessThanLessThanToken */: + return 202 /* LeftShiftExpression */; - case 96 /* GreaterThanGreaterThanToken */: - return 202 /* SignedRightShiftExpression */; + case 97 /* GreaterThanGreaterThanToken */: + return 203 /* SignedRightShiftExpression */; - case 97 /* GreaterThanGreaterThanGreaterThanToken */: - return 203 /* UnsignedRightShiftExpression */; + case 98 /* GreaterThanGreaterThanGreaterThanToken */: + return 204 /* UnsignedRightShiftExpression */; - case 80 /* LessThanToken */: - return 195 /* LessThanExpression */; + case 81 /* LessThanToken */: + return 196 /* LessThanExpression */; - case 81 /* GreaterThanToken */: - return 196 /* GreaterThanExpression */; + case 82 /* GreaterThanToken */: + return 197 /* GreaterThanExpression */; - case 82 /* LessThanEqualsToken */: - return 197 /* LessThanOrEqualExpression */; + case 83 /* LessThanEqualsToken */: + return 198 /* LessThanOrEqualExpression */; - case 83 /* GreaterThanEqualsToken */: - return 198 /* GreaterThanOrEqualExpression */; + case 84 /* GreaterThanEqualsToken */: + return 199 /* GreaterThanOrEqualExpression */; case 30 /* InstanceOfKeyword */: - return 199 /* InstanceOfExpression */; + return 200 /* InstanceOfExpression */; case 29 /* InKeyword */: - return 200 /* InExpression */; + return 201 /* InExpression */; - case 84 /* EqualsEqualsToken */: - return 191 /* EqualsWithTypeConversionExpression */; + case 85 /* EqualsEqualsToken */: + return 192 /* EqualsWithTypeConversionExpression */; - case 86 /* ExclamationEqualsToken */: - return 192 /* NotEqualsWithTypeConversionExpression */; + case 87 /* ExclamationEqualsToken */: + return 193 /* NotEqualsWithTypeConversionExpression */; - case 87 /* EqualsEqualsEqualsToken */: - return 193 /* EqualsExpression */; + case 88 /* EqualsEqualsEqualsToken */: + return 194 /* EqualsExpression */; - case 88 /* ExclamationEqualsEqualsToken */: - return 194 /* NotEqualsExpression */; + case 89 /* ExclamationEqualsEqualsToken */: + return 195 /* NotEqualsExpression */; - case 98 /* AmpersandToken */: - return 190 /* BitwiseAndExpression */; + case 99 /* AmpersandToken */: + return 191 /* BitwiseAndExpression */; - case 100 /* CaretToken */: - return 189 /* BitwiseExclusiveOrExpression */; + case 101 /* CaretToken */: + return 190 /* BitwiseExclusiveOrExpression */; - case 99 /* BarToken */: - return 188 /* BitwiseOrExpression */; + case 100 /* BarToken */: + return 189 /* BitwiseOrExpression */; - case 103 /* AmpersandAmpersandToken */: - return 187 /* LogicalAndExpression */; + case 104 /* AmpersandAmpersandToken */: + return 188 /* LogicalAndExpression */; - case 104 /* BarBarToken */: - return 186 /* LogicalOrExpression */; + case 105 /* BarBarToken */: + return 187 /* LogicalOrExpression */; - case 116 /* BarEqualsToken */: - return 181 /* OrAssignmentExpression */; + case 117 /* BarEqualsToken */: + return 182 /* OrAssignmentExpression */; - case 115 /* AmpersandEqualsToken */: - return 179 /* AndAssignmentExpression */; + case 116 /* AmpersandEqualsToken */: + return 180 /* AndAssignmentExpression */; - case 117 /* CaretEqualsToken */: - return 180 /* ExclusiveOrAssignmentExpression */; + case 118 /* CaretEqualsToken */: + return 181 /* ExclusiveOrAssignmentExpression */; - case 112 /* LessThanLessThanEqualsToken */: - return 182 /* LeftShiftAssignmentExpression */; + case 113 /* LessThanLessThanEqualsToken */: + return 183 /* LeftShiftAssignmentExpression */; - case 113 /* GreaterThanGreaterThanEqualsToken */: - return 183 /* SignedRightShiftAssignmentExpression */; + case 114 /* GreaterThanGreaterThanEqualsToken */: + return 184 /* SignedRightShiftAssignmentExpression */; - case 114 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - return 184 /* UnsignedRightShiftAssignmentExpression */; + case 115 /* GreaterThanGreaterThanGreaterThanEqualsToken */: + return 185 /* UnsignedRightShiftAssignmentExpression */; - case 108 /* PlusEqualsToken */: - return 174 /* AddAssignmentExpression */; + case 109 /* PlusEqualsToken */: + return 175 /* AddAssignmentExpression */; - case 109 /* MinusEqualsToken */: - return 175 /* SubtractAssignmentExpression */; + case 110 /* MinusEqualsToken */: + return 176 /* SubtractAssignmentExpression */; - case 110 /* AsteriskEqualsToken */: - return 176 /* MultiplyAssignmentExpression */; + case 111 /* AsteriskEqualsToken */: + return 177 /* MultiplyAssignmentExpression */; - case 119 /* SlashEqualsToken */: - return 177 /* DivideAssignmentExpression */; + case 120 /* SlashEqualsToken */: + return 178 /* DivideAssignmentExpression */; - case 111 /* PercentEqualsToken */: - return 178 /* ModuloAssignmentExpression */; + case 112 /* PercentEqualsToken */: + return 179 /* ModuloAssignmentExpression */; - case 107 /* EqualsToken */: - return 173 /* AssignmentExpression */; + case 108 /* EqualsToken */: + return 174 /* AssignmentExpression */; - case 79 /* CommaToken */: - return 172 /* CommaExpression */; + case 80 /* CommaToken */: + return 173 /* CommaExpression */; default: return 0 /* None */; @@ -5311,8 +5377,8 @@ var TypeScript; function isAnyDivideToken(kind) { switch (kind) { - case 118 /* SlashToken */: - case 119 /* SlashEqualsToken */: + case 119 /* SlashToken */: + case 120 /* SlashEqualsToken */: return true; default: return false; @@ -5322,8 +5388,8 @@ var TypeScript; function isAnyDivideOrRegularExpressionToken(kind) { switch (kind) { - case 118 /* SlashToken */: - case 119 /* SlashEqualsToken */: + case 119 /* SlashToken */: + case 120 /* SlashEqualsToken */: case 12 /* RegularExpressionLiteral */: return true; default: @@ -5334,11 +5400,11 @@ var TypeScript; function isParserGenerated(kind) { switch (kind) { - case 96 /* GreaterThanGreaterThanToken */: - case 97 /* GreaterThanGreaterThanGreaterThanToken */: - case 83 /* GreaterThanEqualsToken */: - case 113 /* GreaterThanGreaterThanEqualsToken */: - case 114 /* GreaterThanGreaterThanGreaterThanEqualsToken */: + case 97 /* GreaterThanGreaterThanToken */: + case 98 /* GreaterThanGreaterThanGreaterThanToken */: + case 84 /* GreaterThanEqualsToken */: + case 114 /* GreaterThanGreaterThanEqualsToken */: + case 115 /* GreaterThanGreaterThanGreaterThanEqualsToken */: return true; default: return false; @@ -5348,42 +5414,42 @@ var TypeScript; function isAnyBinaryExpression(kind) { switch (kind) { - case 172 /* CommaExpression */: - case 173 /* AssignmentExpression */: - case 174 /* AddAssignmentExpression */: - case 175 /* SubtractAssignmentExpression */: - case 176 /* MultiplyAssignmentExpression */: - case 177 /* DivideAssignmentExpression */: - case 178 /* ModuloAssignmentExpression */: - case 179 /* AndAssignmentExpression */: - case 180 /* ExclusiveOrAssignmentExpression */: - case 181 /* OrAssignmentExpression */: - case 182 /* LeftShiftAssignmentExpression */: - case 183 /* SignedRightShiftAssignmentExpression */: - case 184 /* UnsignedRightShiftAssignmentExpression */: - case 186 /* LogicalOrExpression */: - case 187 /* LogicalAndExpression */: - case 188 /* BitwiseOrExpression */: - case 189 /* BitwiseExclusiveOrExpression */: - case 190 /* BitwiseAndExpression */: - case 191 /* EqualsWithTypeConversionExpression */: - case 192 /* NotEqualsWithTypeConversionExpression */: - case 193 /* EqualsExpression */: - case 194 /* NotEqualsExpression */: - case 195 /* LessThanExpression */: - case 196 /* GreaterThanExpression */: - case 197 /* LessThanOrEqualExpression */: - case 198 /* GreaterThanOrEqualExpression */: - case 199 /* InstanceOfExpression */: - case 200 /* InExpression */: - case 201 /* LeftShiftExpression */: - case 202 /* SignedRightShiftExpression */: - case 203 /* UnsignedRightShiftExpression */: - case 204 /* MultiplyExpression */: - case 205 /* DivideExpression */: - case 206 /* ModuloExpression */: - case 207 /* AddExpression */: - case 208 /* SubtractExpression */: + case 173 /* CommaExpression */: + case 174 /* AssignmentExpression */: + case 175 /* AddAssignmentExpression */: + case 176 /* SubtractAssignmentExpression */: + case 177 /* MultiplyAssignmentExpression */: + case 178 /* DivideAssignmentExpression */: + case 179 /* ModuloAssignmentExpression */: + case 180 /* AndAssignmentExpression */: + case 181 /* ExclusiveOrAssignmentExpression */: + case 182 /* OrAssignmentExpression */: + case 183 /* LeftShiftAssignmentExpression */: + case 184 /* SignedRightShiftAssignmentExpression */: + case 185 /* UnsignedRightShiftAssignmentExpression */: + case 187 /* LogicalOrExpression */: + case 188 /* LogicalAndExpression */: + case 189 /* BitwiseOrExpression */: + case 190 /* BitwiseExclusiveOrExpression */: + case 191 /* BitwiseAndExpression */: + case 192 /* EqualsWithTypeConversionExpression */: + case 193 /* NotEqualsWithTypeConversionExpression */: + case 194 /* EqualsExpression */: + case 195 /* NotEqualsExpression */: + case 196 /* LessThanExpression */: + case 197 /* GreaterThanExpression */: + case 198 /* LessThanOrEqualExpression */: + case 199 /* GreaterThanOrEqualExpression */: + case 200 /* InstanceOfExpression */: + case 201 /* InExpression */: + case 202 /* LeftShiftExpression */: + case 203 /* SignedRightShiftExpression */: + case 204 /* UnsignedRightShiftExpression */: + case 205 /* MultiplyExpression */: + case 206 /* DivideExpression */: + case 207 /* ModuloExpression */: + case 208 /* AddExpression */: + case 209 /* SubtractExpression */: return true; } @@ -5415,7 +5481,7 @@ var TypeScript; isNumericLiteralStart[46 /* dot */] = true; - for (var keywordKind = 15 /* FirstKeyword */; keywordKind <= 69 /* LastKeyword */; keywordKind++) { + for (var keywordKind = 15 /* FirstKeyword */; keywordKind <= 70 /* LastKeyword */; keywordKind++) { var keyword = TypeScript.SyntaxFacts.getText(keywordKind); isKeywordStartCharacter[keyword.charCodeAt(0)] = true; } @@ -5822,40 +5888,40 @@ var TypeScript; return this.scanLessThanToken(); case 62 /* greaterThan */: - return this.advanceAndSetTokenKind(81 /* GreaterThanToken */); + return this.advanceAndSetTokenKind(82 /* GreaterThanToken */); case 44 /* comma */: - return this.advanceAndSetTokenKind(79 /* CommaToken */); + return this.advanceAndSetTokenKind(80 /* CommaToken */); case 58 /* colon */: - return this.advanceAndSetTokenKind(106 /* ColonToken */); + return this.advanceAndSetTokenKind(107 /* ColonToken */); case 59 /* semicolon */: - return this.advanceAndSetTokenKind(78 /* SemicolonToken */); + return this.advanceAndSetTokenKind(79 /* SemicolonToken */); case 126 /* tilde */: - return this.advanceAndSetTokenKind(102 /* TildeToken */); + return this.advanceAndSetTokenKind(103 /* TildeToken */); case 40 /* openParen */: - return this.advanceAndSetTokenKind(72 /* OpenParenToken */); + return this.advanceAndSetTokenKind(73 /* OpenParenToken */); case 41 /* closeParen */: - return this.advanceAndSetTokenKind(73 /* CloseParenToken */); + return this.advanceAndSetTokenKind(74 /* CloseParenToken */); case 123 /* openBrace */: - return this.advanceAndSetTokenKind(70 /* OpenBraceToken */); + return this.advanceAndSetTokenKind(71 /* OpenBraceToken */); case 125 /* closeBrace */: - return this.advanceAndSetTokenKind(71 /* CloseBraceToken */); + return this.advanceAndSetTokenKind(72 /* CloseBraceToken */); case 91 /* openBracket */: - return this.advanceAndSetTokenKind(74 /* OpenBracketToken */); + return this.advanceAndSetTokenKind(75 /* OpenBracketToken */); case 93 /* closeBracket */: - return this.advanceAndSetTokenKind(75 /* CloseBracketToken */); + return this.advanceAndSetTokenKind(76 /* CloseBracketToken */); case 63 /* question */: - return this.advanceAndSetTokenKind(105 /* QuestionToken */); + return this.advanceAndSetTokenKind(106 /* QuestionToken */); } if (isNumericLiteralStart[character]) { @@ -6004,17 +6070,17 @@ var TypeScript; this.slidingWindow.moveToNextItem(); if (this.currentCharCode() === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 82 /* LessThanEqualsToken */; + return 83 /* LessThanEqualsToken */; } else if (this.currentCharCode() === 60 /* lessThan */) { this.slidingWindow.moveToNextItem(); if (this.currentCharCode() === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 112 /* LessThanLessThanEqualsToken */; + return 113 /* LessThanLessThanEqualsToken */; } else { - return 95 /* LessThanLessThanToken */; + return 96 /* LessThanLessThanToken */; } } else { - return 80 /* LessThanToken */; + return 81 /* LessThanToken */; } }; @@ -6022,12 +6088,12 @@ var TypeScript; this.slidingWindow.moveToNextItem(); if (this.currentCharCode() === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 116 /* BarEqualsToken */; + return 117 /* BarEqualsToken */; } else if (this.currentCharCode() === 124 /* bar */) { this.slidingWindow.moveToNextItem(); - return 104 /* BarBarToken */; + return 105 /* BarBarToken */; } else { - return 99 /* BarToken */; + return 100 /* BarToken */; } }; @@ -6035,9 +6101,9 @@ var TypeScript; this.slidingWindow.moveToNextItem(); if (this.currentCharCode() === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 117 /* CaretEqualsToken */; + return 118 /* CaretEqualsToken */; } else { - return 100 /* CaretToken */; + return 101 /* CaretToken */; } }; @@ -6046,12 +6112,12 @@ var TypeScript; var character = this.currentCharCode(); if (character === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 115 /* AmpersandEqualsToken */; + return 116 /* AmpersandEqualsToken */; } else if (this.currentCharCode() === 38 /* ampersand */) { this.slidingWindow.moveToNextItem(); - return 103 /* AmpersandAmpersandToken */; + return 104 /* AmpersandAmpersandToken */; } else { - return 98 /* AmpersandToken */; + return 99 /* AmpersandToken */; } }; @@ -6059,9 +6125,9 @@ var TypeScript; this.slidingWindow.moveToNextItem(); if (this.currentCharCode() === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 111 /* PercentEqualsToken */; + return 112 /* PercentEqualsToken */; } else { - return 92 /* PercentToken */; + return 93 /* PercentToken */; } }; @@ -6071,12 +6137,12 @@ var TypeScript; if (character === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 109 /* MinusEqualsToken */; + return 110 /* MinusEqualsToken */; } else if (character === 45 /* minus */) { this.slidingWindow.moveToNextItem(); - return 94 /* MinusMinusToken */; + return 95 /* MinusMinusToken */; } else { - return 90 /* MinusToken */; + return 91 /* MinusToken */; } }; @@ -6085,12 +6151,12 @@ var TypeScript; var character = this.currentCharCode(); if (character === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 108 /* PlusEqualsToken */; + return 109 /* PlusEqualsToken */; } else if (character === 43 /* plus */) { this.slidingWindow.moveToNextItem(); - return 93 /* PlusPlusToken */; + return 94 /* PlusPlusToken */; } else { - return 89 /* PlusToken */; + return 90 /* PlusToken */; } }; @@ -6098,9 +6164,9 @@ var TypeScript; this.slidingWindow.moveToNextItem(); if (this.currentCharCode() === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 110 /* AsteriskEqualsToken */; + return 111 /* AsteriskEqualsToken */; } else { - return 91 /* AsteriskToken */; + return 92 /* AsteriskToken */; } }; @@ -6113,15 +6179,15 @@ var TypeScript; if (this.currentCharCode() === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 87 /* EqualsEqualsEqualsToken */; + return 88 /* EqualsEqualsEqualsToken */; } else { - return 84 /* EqualsEqualsToken */; + return 85 /* EqualsEqualsToken */; } } else if (character === 62 /* greaterThan */) { this.slidingWindow.moveToNextItem(); - return 85 /* EqualsGreaterThanToken */; + return 86 /* EqualsGreaterThanToken */; } else { - return 107 /* EqualsToken */; + return 108 /* EqualsToken */; } }; @@ -6143,9 +6209,9 @@ var TypeScript; if (this.currentCharCode() === 46 /* dot */ && this.slidingWindow.peekItemN(1) === 46 /* dot */) { this.slidingWindow.moveToNextItem(); this.slidingWindow.moveToNextItem(); - return 77 /* DotDotDotToken */; + return 78 /* DotDotDotToken */; } else { - return 76 /* DotToken */; + return 77 /* DotToken */; } }; @@ -6160,9 +6226,9 @@ var TypeScript; this.slidingWindow.moveToNextItem(); if (this.currentCharCode() === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 119 /* SlashEqualsToken */; + return 120 /* SlashEqualsToken */; } else { - return 118 /* SlashToken */; + return 119 /* SlashToken */; } }; @@ -6231,12 +6297,12 @@ var TypeScript; if (this.currentCharCode() === 61 /* equals */) { this.slidingWindow.moveToNextItem(); - return 88 /* ExclamationEqualsEqualsToken */; + return 89 /* ExclamationEqualsEqualsToken */; } else { - return 86 /* ExclamationEqualsToken */; + return 87 /* ExclamationEqualsToken */; } } else { - return 101 /* ExclamationToken */; + return 102 /* ExclamationToken */; } }; @@ -6490,9 +6556,9 @@ var TypeScript; case 97 /* a */: return (array[startIndex + 1] === 110 /* n */ && array[startIndex + 2] === 121 /* y */) ? 60 /* AnyKeyword */ : 11 /* IdentifierName */; case 103 /* g */: - return (array[startIndex + 1] === 101 /* e */ && array[startIndex + 2] === 116 /* t */) ? 64 /* GetKeyword */ : 11 /* IdentifierName */; + return (array[startIndex + 1] === 101 /* e */ && array[startIndex + 2] === 116 /* t */) ? 65 /* GetKeyword */ : 11 /* IdentifierName */; case 115 /* s */: - return (array[startIndex + 1] === 101 /* e */ && array[startIndex + 2] === 116 /* t */) ? 68 /* SetKeyword */ : 11 /* IdentifierName */; + return (array[startIndex + 1] === 101 /* e */ && array[startIndex + 2] === 116 /* t */) ? 69 /* SetKeyword */ : 11 /* IdentifierName */; default: return 11 /* IdentifierName */; } @@ -6527,6 +6593,8 @@ var TypeScript; return (array[startIndex + 1] === 111 /* o */ && array[startIndex + 2] === 105 /* i */ && array[startIndex + 3] === 100 /* d */) ? 41 /* VoidKeyword */ : 11 /* IdentifierName */; case 119 /* w */: return (array[startIndex + 1] === 105 /* i */ && array[startIndex + 2] === 116 /* t */ && array[startIndex + 3] === 104 /* h */) ? 43 /* WithKeyword */ : 11 /* IdentifierName */; + case 98 /* b */: + return (array[startIndex + 1] === 111 /* o */ && array[startIndex + 2] === 111 /* o */ && array[startIndex + 3] === 108 /* l */) ? 62 /* BoolKeyword */ : 11 /* IdentifierName */; default: return 11 /* IdentifierName */; } @@ -6576,7 +6644,7 @@ var TypeScript; case 97 /* a */: return (array[startIndex + 3] === 116 /* t */ && array[startIndex + 4] === 105 /* i */ && array[startIndex + 5] === 99 /* c */) ? 58 /* StaticKeyword */ : 11 /* IdentifierName */; case 114 /* r */: - return (array[startIndex + 3] === 105 /* i */ && array[startIndex + 4] === 110 /* n */ && array[startIndex + 5] === 103 /* g */) ? 69 /* StringKeyword */ : 11 /* IdentifierName */; + return (array[startIndex + 3] === 105 /* i */ && array[startIndex + 4] === 110 /* n */ && array[startIndex + 5] === 103 /* g */) ? 70 /* StringKeyword */ : 11 /* IdentifierName */; default: return 11 /* IdentifierName */; } @@ -6594,9 +6662,9 @@ var TypeScript; case 112 /* p */: return (array[startIndex + 1] === 117 /* u */ && array[startIndex + 2] === 98 /* b */ && array[startIndex + 3] === 108 /* l */ && array[startIndex + 4] === 105 /* i */ && array[startIndex + 5] === 99 /* c */) ? 57 /* PublicKeyword */ : 11 /* IdentifierName */; case 109 /* m */: - return (array[startIndex + 1] === 111 /* o */ && array[startIndex + 2] === 100 /* d */ && array[startIndex + 3] === 117 /* u */ && array[startIndex + 4] === 108 /* l */ && array[startIndex + 5] === 101 /* e */) ? 65 /* ModuleKeyword */ : 11 /* IdentifierName */; + return (array[startIndex + 1] === 111 /* o */ && array[startIndex + 2] === 100 /* d */ && array[startIndex + 3] === 117 /* u */ && array[startIndex + 4] === 108 /* l */ && array[startIndex + 5] === 101 /* e */) ? 66 /* ModuleKeyword */ : 11 /* IdentifierName */; case 110 /* n */: - return (array[startIndex + 1] === 117 /* u */ && array[startIndex + 2] === 109 /* m */ && array[startIndex + 3] === 98 /* b */ && array[startIndex + 4] === 101 /* e */ && array[startIndex + 5] === 114 /* r */) ? 67 /* NumberKeyword */ : 11 /* IdentifierName */; + return (array[startIndex + 1] === 117 /* u */ && array[startIndex + 2] === 109 /* m */ && array[startIndex + 3] === 98 /* b */ && array[startIndex + 4] === 101 /* e */ && array[startIndex + 5] === 114 /* r */) ? 68 /* NumberKeyword */ : 11 /* IdentifierName */; default: return 11 /* IdentifierName */; } @@ -6610,7 +6678,7 @@ var TypeScript; case 102 /* f */: return (array[startIndex + 3] === 97 /* a */ && array[startIndex + 4] === 117 /* u */ && array[startIndex + 5] === 108 /* l */ && array[startIndex + 6] === 116 /* t */) ? 20 /* DefaultKeyword */ : 11 /* IdentifierName */; case 99 /* c */: - return (array[startIndex + 3] === 108 /* l */ && array[startIndex + 4] === 97 /* a */ && array[startIndex + 5] === 114 /* r */ && array[startIndex + 6] === 101 /* e */) ? 63 /* DeclareKeyword */ : 11 /* IdentifierName */; + return (array[startIndex + 3] === 108 /* l */ && array[startIndex + 4] === 97 /* a */ && array[startIndex + 5] === 114 /* r */ && array[startIndex + 6] === 101 /* e */) ? 64 /* DeclareKeyword */ : 11 /* IdentifierName */; default: return 11 /* IdentifierName */; } @@ -6636,7 +6704,7 @@ var TypeScript; case 98 /* b */: return (array[startIndex + 1] === 111 /* o */ && array[startIndex + 2] === 111 /* o */ && array[startIndex + 3] === 108 /* l */ && array[startIndex + 4] === 101 /* e */ && array[startIndex + 5] === 97 /* a */ && array[startIndex + 6] === 110 /* n */) ? 61 /* BooleanKeyword */ : 11 /* IdentifierName */; case 114 /* r */: - return (array[startIndex + 1] === 101 /* e */ && array[startIndex + 2] === 113 /* q */ && array[startIndex + 3] === 117 /* u */ && array[startIndex + 4] === 105 /* i */ && array[startIndex + 5] === 114 /* r */ && array[startIndex + 6] === 101 /* e */) ? 66 /* RequireKeyword */ : 11 /* IdentifierName */; + return (array[startIndex + 1] === 101 /* e */ && array[startIndex + 2] === 113 /* q */ && array[startIndex + 3] === 117 /* u */ && array[startIndex + 4] === 105 /* i */ && array[startIndex + 5] === 114 /* r */ && array[startIndex + 6] === 101 /* e */) ? 67 /* RequireKeyword */ : 11 /* IdentifierName */; default: return 11 /* IdentifierName */; } @@ -6680,7 +6748,7 @@ var TypeScript; } case 11: - return (array[startIndex] === 99 /* c */ && array[startIndex + 1] === 111 /* o */ && array[startIndex + 2] === 110 /* n */ && array[startIndex + 3] === 115 /* s */ && array[startIndex + 4] === 116 /* t */ && array[startIndex + 5] === 114 /* r */ && array[startIndex + 6] === 117 /* u */ && array[startIndex + 7] === 99 /* c */ && array[startIndex + 8] === 116 /* t */ && array[startIndex + 9] === 111 /* o */ && array[startIndex + 10] === 114 /* r */) ? 62 /* ConstructorKeyword */ : 11 /* IdentifierName */; + return (array[startIndex] === 99 /* c */ && array[startIndex + 1] === 111 /* o */ && array[startIndex + 2] === 110 /* n */ && array[startIndex + 3] === 115 /* s */ && array[startIndex + 4] === 116 /* t */ && array[startIndex + 5] === 114 /* r */ && array[startIndex + 6] === 117 /* u */ && array[startIndex + 7] === 99 /* c */ && array[startIndex + 8] === 116 /* t */ && array[startIndex + 9] === 111 /* o */ && array[startIndex + 10] === 114 /* r */) ? 63 /* ConstructorKeyword */ : 11 /* IdentifierName */; default: return 11 /* IdentifierName */; } @@ -7332,9 +7400,9 @@ var TypeScript; var parentPositionedNode = positionedToken.containingNode(); var parentNode = parentPositionedNode.node(); - if (parentNode.kind() === 121 /* QualifiedName */ && (parentNode).right === token) { + if (parentNode.kind() === 122 /* QualifiedName */ && (parentNode).right === token) { return parentPositionedNode; - } else if (parentNode.kind() === 211 /* MemberAccessExpression */ && (parentNode).name === token) { + } else if (parentNode.kind() === 212 /* MemberAccessExpression */ && (parentNode).name === token) { return parentPositionedNode; } } @@ -7350,9 +7418,9 @@ var TypeScript; if (parent !== null) { switch (parent.kind()) { - case 246 /* ModuleNameModuleReference */: + case 247 /* ModuleNameModuleReference */: return true; - case 121 /* QualifiedName */: + case 122 /* QualifiedName */: return true; default: return isInTypeOnlyContext(positionedToken); @@ -7373,13 +7441,13 @@ var TypeScript; if (parent !== null) { switch (parent.kind()) { - case 124 /* ArrayType */: + case 125 /* ArrayType */: return (parent).type === nodeOrToken; - case 219 /* CastExpression */: + case 220 /* CastExpression */: return (parent).type === nodeOrToken; - case 244 /* TypeAnnotation */: - case 229 /* HeritageClause */: - case 227 /* TypeArgumentList */: + case 245 /* TypeAnnotation */: + case 230 /* HeritageClause */: + case 228 /* TypeArgumentList */: return true; } } @@ -7578,27 +7646,27 @@ var TypeScript; Syntax.stringLiteralExpression = stringLiteralExpression; function isSuperInvocationExpression(node) { - return node.kind() === 212 /* InvocationExpression */ && (node).expression.kind() === 50 /* SuperKeyword */; + return node.kind() === 213 /* InvocationExpression */ && (node).expression.kind() === 50 /* SuperKeyword */; } Syntax.isSuperInvocationExpression = isSuperInvocationExpression; function isSuperInvocationExpressionStatement(node) { - return node.kind() === 148 /* ExpressionStatement */ && isSuperInvocationExpression((node).expression); + return node.kind() === 149 /* ExpressionStatement */ && isSuperInvocationExpression((node).expression); } Syntax.isSuperInvocationExpressionStatement = isSuperInvocationExpressionStatement; function isSuperMemberAccessExpression(node) { - return node.kind() === 211 /* MemberAccessExpression */ && (node).expression.kind() === 50 /* SuperKeyword */; + return node.kind() === 212 /* MemberAccessExpression */ && (node).expression.kind() === 50 /* SuperKeyword */; } Syntax.isSuperMemberAccessExpression = isSuperMemberAccessExpression; function isSuperMemberAccessInvocationExpression(node) { - return node.kind() === 212 /* InvocationExpression */ && isSuperMemberAccessExpression((node).expression); + return node.kind() === 213 /* InvocationExpression */ && isSuperMemberAccessExpression((node).expression); } Syntax.isSuperMemberAccessInvocationExpression = isSuperMemberAccessInvocationExpression; function assignmentExpression(left, token, right) { - return TypeScript.Syntax.normalModeFactory.binaryExpression(173 /* AssignmentExpression */, left, token, right); + return TypeScript.Syntax.normalModeFactory.binaryExpression(174 /* AssignmentExpression */, left, token, right); } Syntax.assignmentExpression = assignmentExpression; @@ -7810,8 +7878,8 @@ var TypeScript; function isIntegerLiteral(expression) { if (expression) { switch (expression.kind()) { - case 163 /* PlusExpression */: - case 164 /* NegateExpression */: + case 164 /* PlusExpression */: + case 165 /* NegateExpression */: expression = (expression).operand; return isInteger((expression).text()); @@ -7845,8 +7913,8 @@ var TypeScript; NormalModeFactory.prototype.sourceUnit = function (moduleElements, endOfFileToken) { return new TypeScript.SourceUnitSyntax(moduleElements, endOfFileToken, false); }; - NormalModeFactory.prototype.externalModuleReference = function (requireKeyword, openParenToken, stringLiteral, closeParenToken) { - return new TypeScript.ExternalModuleReferenceSyntax(requireKeyword, openParenToken, stringLiteral, closeParenToken, false); + NormalModeFactory.prototype.externalModuleReference = function (moduleOrRequireKeyword, openParenToken, stringLiteral, closeParenToken) { + return new TypeScript.ExternalModuleReferenceSyntax(moduleOrRequireKeyword, openParenToken, stringLiteral, closeParenToken, false); }; NormalModeFactory.prototype.moduleNameModuleReference = function (moduleName) { return new TypeScript.ModuleNameModuleReferenceSyntax(moduleName, false); @@ -8110,8 +8178,8 @@ var TypeScript; StrictModeFactory.prototype.sourceUnit = function (moduleElements, endOfFileToken) { return new TypeScript.SourceUnitSyntax(moduleElements, endOfFileToken, true); }; - StrictModeFactory.prototype.externalModuleReference = function (requireKeyword, openParenToken, stringLiteral, closeParenToken) { - return new TypeScript.ExternalModuleReferenceSyntax(requireKeyword, openParenToken, stringLiteral, closeParenToken, true); + StrictModeFactory.prototype.externalModuleReference = function (moduleOrRequireKeyword, openParenToken, stringLiteral, closeParenToken) { + return new TypeScript.ExternalModuleReferenceSyntax(moduleOrRequireKeyword, openParenToken, stringLiteral, closeParenToken, true); }; StrictModeFactory.prototype.moduleNameModuleReference = function (moduleName) { return new TypeScript.ModuleNameModuleReferenceSyntax(moduleName, true); @@ -8378,7 +8446,7 @@ var TypeScript; (function (TypeScript) { (function (SyntaxFacts) { function isDirectivePrologueElement(node) { - if (node.kind() === 148 /* ExpressionStatement */) { + if (node.kind() === 149 /* ExpressionStatement */) { var expressionStatement = node; var expression = expressionStatement.expression; @@ -9013,7 +9081,7 @@ var TypeScript; }; SyntaxNode.prototype.tryGetEndOfFileAt = function (position) { - if (this.kind() === 120 /* SourceUnit */ && position === this.fullWidth()) { + if (this.kind() === 121 /* SourceUnit */ && position === this.fullWidth()) { var sourceUnit = this; return new TypeScript.PositionedToken(new TypeScript.PositionedNode(null, sourceUnit, 0), sourceUnit.endOfFileToken, sourceUnit.moduleElements.fullWidth()); } @@ -9150,7 +9218,7 @@ var TypeScript; }; SourceUnitSyntax.prototype.kind = function () { - return 120 /* SourceUnit */; + return 121 /* SourceUnit */; }; SourceUnitSyntax.prototype.childCount = function () { @@ -9240,9 +9308,9 @@ var TypeScript; var ExternalModuleReferenceSyntax = (function (_super) { __extends(ExternalModuleReferenceSyntax, _super); - function ExternalModuleReferenceSyntax(requireKeyword, openParenToken, stringLiteral, closeParenToken, parsedInStrictMode) { + function ExternalModuleReferenceSyntax(moduleOrRequireKeyword, openParenToken, stringLiteral, closeParenToken, parsedInStrictMode) { _super.call(this, parsedInStrictMode); - this.requireKeyword = requireKeyword; + this.moduleOrRequireKeyword = moduleOrRequireKeyword; this.openParenToken = openParenToken; this.stringLiteral = stringLiteral; this.closeParenToken = closeParenToken; @@ -9252,7 +9320,7 @@ var TypeScript; }; ExternalModuleReferenceSyntax.prototype.kind = function () { - return 245 /* ExternalModuleReference */; + return 246 /* ExternalModuleReference */; }; ExternalModuleReferenceSyntax.prototype.childCount = function () { @@ -9262,7 +9330,7 @@ var TypeScript; ExternalModuleReferenceSyntax.prototype.childAt = function (slot) { switch (slot) { case 0: - return this.requireKeyword; + return this.moduleOrRequireKeyword; case 1: return this.openParenToken; case 2: @@ -9274,16 +9342,16 @@ var TypeScript; } }; - ExternalModuleReferenceSyntax.prototype.update = function (requireKeyword, openParenToken, stringLiteral, closeParenToken) { - if (this.requireKeyword === requireKeyword && this.openParenToken === openParenToken && this.stringLiteral === stringLiteral && this.closeParenToken === closeParenToken) { + ExternalModuleReferenceSyntax.prototype.update = function (moduleOrRequireKeyword, openParenToken, stringLiteral, closeParenToken) { + if (this.moduleOrRequireKeyword === moduleOrRequireKeyword && this.openParenToken === openParenToken && this.stringLiteral === stringLiteral && this.closeParenToken === closeParenToken) { return this; } - return new ExternalModuleReferenceSyntax(requireKeyword, openParenToken, stringLiteral, closeParenToken, this.parsedInStrictMode()); + return new ExternalModuleReferenceSyntax(moduleOrRequireKeyword, openParenToken, stringLiteral, closeParenToken, this.parsedInStrictMode()); }; - ExternalModuleReferenceSyntax.create1 = function (stringLiteral) { - return new ExternalModuleReferenceSyntax(TypeScript.Syntax.token(66 /* RequireKeyword */), TypeScript.Syntax.token(72 /* OpenParenToken */), stringLiteral, TypeScript.Syntax.token(73 /* CloseParenToken */), false); + ExternalModuleReferenceSyntax.create1 = function (moduleOrRequireKeyword, stringLiteral) { + return new ExternalModuleReferenceSyntax(moduleOrRequireKeyword, TypeScript.Syntax.token(73 /* OpenParenToken */), stringLiteral, TypeScript.Syntax.token(74 /* CloseParenToken */), false); }; ExternalModuleReferenceSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -9294,20 +9362,20 @@ var TypeScript; return _super.prototype.withTrailingTrivia.call(this, trivia); }; - ExternalModuleReferenceSyntax.prototype.withRequireKeyword = function (requireKeyword) { - return this.update(requireKeyword, this.openParenToken, this.stringLiteral, this.closeParenToken); + ExternalModuleReferenceSyntax.prototype.withModuleOrRequireKeyword = function (moduleOrRequireKeyword) { + return this.update(moduleOrRequireKeyword, this.openParenToken, this.stringLiteral, this.closeParenToken); }; ExternalModuleReferenceSyntax.prototype.withOpenParenToken = function (openParenToken) { - return this.update(this.requireKeyword, openParenToken, this.stringLiteral, this.closeParenToken); + return this.update(this.moduleOrRequireKeyword, openParenToken, this.stringLiteral, this.closeParenToken); }; ExternalModuleReferenceSyntax.prototype.withStringLiteral = function (stringLiteral) { - return this.update(this.requireKeyword, this.openParenToken, stringLiteral, this.closeParenToken); + return this.update(this.moduleOrRequireKeyword, this.openParenToken, stringLiteral, this.closeParenToken); }; ExternalModuleReferenceSyntax.prototype.withCloseParenToken = function (closeParenToken) { - return this.update(this.requireKeyword, this.openParenToken, this.stringLiteral, closeParenToken); + return this.update(this.moduleOrRequireKeyword, this.openParenToken, this.stringLiteral, closeParenToken); }; ExternalModuleReferenceSyntax.prototype.isTypeScriptSpecific = function () { @@ -9328,7 +9396,7 @@ var TypeScript; }; ModuleNameModuleReferenceSyntax.prototype.kind = function () { - return 246 /* ModuleNameModuleReference */; + return 247 /* ModuleNameModuleReference */; }; ModuleNameModuleReferenceSyntax.prototype.childCount = function () { @@ -9387,7 +9455,7 @@ var TypeScript; }; ImportDeclarationSyntax.prototype.kind = function () { - return 133 /* ImportDeclaration */; + return 134 /* ImportDeclaration */; }; ImportDeclarationSyntax.prototype.childCount = function () { @@ -9430,7 +9498,7 @@ var TypeScript; }; ImportDeclarationSyntax.create1 = function (identifier, moduleReference) { - return new ImportDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(49 /* ImportKeyword */), identifier, TypeScript.Syntax.token(107 /* EqualsToken */), moduleReference, TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new ImportDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(49 /* ImportKeyword */), identifier, TypeScript.Syntax.token(108 /* EqualsToken */), moduleReference, TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; ImportDeclarationSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -9490,7 +9558,7 @@ var TypeScript; }; ExportAssignmentSyntax.prototype.kind = function () { - return 134 /* ExportAssignment */; + return 135 /* ExportAssignment */; }; ExportAssignmentSyntax.prototype.childCount = function () { @@ -9525,7 +9593,7 @@ var TypeScript; }; ExportAssignmentSyntax.create1 = function (identifier) { - return new ExportAssignmentSyntax(TypeScript.Syntax.token(47 /* ExportKeyword */), TypeScript.Syntax.token(107 /* EqualsToken */), identifier, TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new ExportAssignmentSyntax(TypeScript.Syntax.token(47 /* ExportKeyword */), TypeScript.Syntax.token(108 /* EqualsToken */), identifier, TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; ExportAssignmentSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -9577,7 +9645,7 @@ var TypeScript; }; ClassDeclarationSyntax.prototype.kind = function () { - return 131 /* ClassDeclaration */; + return 132 /* ClassDeclaration */; }; ClassDeclarationSyntax.prototype.childCount = function () { @@ -9624,7 +9692,7 @@ var TypeScript; }; ClassDeclarationSyntax.create1 = function (identifier) { - return new ClassDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(44 /* ClassKeyword */), identifier, null, TypeScript.Syntax.emptyList, TypeScript.Syntax.token(70 /* OpenBraceToken */), TypeScript.Syntax.emptyList, TypeScript.Syntax.token(71 /* CloseBraceToken */), false); + return new ClassDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(44 /* ClassKeyword */), identifier, null, TypeScript.Syntax.emptyList, TypeScript.Syntax.token(71 /* OpenBraceToken */), TypeScript.Syntax.emptyList, TypeScript.Syntax.token(72 /* CloseBraceToken */), false); }; ClassDeclarationSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -9702,7 +9770,7 @@ var TypeScript; }; InterfaceDeclarationSyntax.prototype.kind = function () { - return 128 /* InterfaceDeclaration */; + return 129 /* InterfaceDeclaration */; }; InterfaceDeclarationSyntax.prototype.childCount = function () { @@ -9807,7 +9875,7 @@ var TypeScript; }; HeritageClauseSyntax.prototype.kind = function () { - return 229 /* HeritageClause */; + return 230 /* HeritageClause */; }; HeritageClauseSyntax.prototype.childCount = function () { @@ -9877,7 +9945,7 @@ var TypeScript; }; ModuleDeclarationSyntax.prototype.kind = function () { - return 130 /* ModuleDeclaration */; + return 131 /* ModuleDeclaration */; }; ModuleDeclarationSyntax.prototype.childCount = function () { @@ -9922,7 +9990,7 @@ var TypeScript; }; ModuleDeclarationSyntax.create1 = function () { - return new ModuleDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(65 /* ModuleKeyword */), null, null, TypeScript.Syntax.token(70 /* OpenBraceToken */), TypeScript.Syntax.emptyList, TypeScript.Syntax.token(71 /* CloseBraceToken */), false); + return new ModuleDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(66 /* ModuleKeyword */), null, null, TypeScript.Syntax.token(71 /* OpenBraceToken */), TypeScript.Syntax.emptyList, TypeScript.Syntax.token(72 /* CloseBraceToken */), false); }; ModuleDeclarationSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -9992,7 +10060,7 @@ var TypeScript; }; FunctionDeclarationSyntax.prototype.kind = function () { - return 129 /* FunctionDeclaration */; + return 130 /* FunctionDeclaration */; }; FunctionDeclarationSyntax.prototype.childCount = function () { @@ -10107,7 +10175,7 @@ var TypeScript; }; VariableStatementSyntax.prototype.kind = function () { - return 147 /* VariableStatement */; + return 148 /* VariableStatement */; }; VariableStatementSyntax.prototype.childCount = function () { @@ -10148,7 +10216,7 @@ var TypeScript; }; VariableStatementSyntax.create1 = function (variableDeclaration) { - return new VariableStatementSyntax(TypeScript.Syntax.emptyList, variableDeclaration, TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new VariableStatementSyntax(TypeScript.Syntax.emptyList, variableDeclaration, TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; VariableStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -10200,7 +10268,7 @@ var TypeScript; }; VariableDeclarationSyntax.prototype.kind = function () { - return 223 /* VariableDeclaration */; + return 224 /* VariableDeclaration */; }; VariableDeclarationSyntax.prototype.childCount = function () { @@ -10273,7 +10341,7 @@ var TypeScript; }; VariableDeclaratorSyntax.prototype.kind = function () { - return 224 /* VariableDeclarator */; + return 225 /* VariableDeclarator */; }; VariableDeclaratorSyntax.prototype.childCount = function () { @@ -10354,7 +10422,7 @@ var TypeScript; }; EqualsValueClauseSyntax.prototype.kind = function () { - return 230 /* EqualsValueClause */; + return 231 /* EqualsValueClause */; }; EqualsValueClauseSyntax.prototype.childCount = function () { @@ -10381,7 +10449,7 @@ var TypeScript; }; EqualsValueClauseSyntax.create1 = function (value) { - return new EqualsValueClauseSyntax(TypeScript.Syntax.token(107 /* EqualsToken */), value, false); + return new EqualsValueClauseSyntax(TypeScript.Syntax.token(108 /* EqualsToken */), value, false); }; EqualsValueClauseSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -10501,7 +10569,7 @@ var TypeScript; }; ArrayLiteralExpressionSyntax.prototype.kind = function () { - return 213 /* ArrayLiteralExpression */; + return 214 /* ArrayLiteralExpression */; }; ArrayLiteralExpressionSyntax.prototype.childCount = function () { @@ -10542,7 +10610,7 @@ var TypeScript; }; ArrayLiteralExpressionSyntax.create1 = function () { - return new ArrayLiteralExpressionSyntax(TypeScript.Syntax.token(74 /* OpenBracketToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(75 /* CloseBracketToken */), false); + return new ArrayLiteralExpressionSyntax(TypeScript.Syntax.token(75 /* OpenBracketToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(76 /* CloseBracketToken */), false); }; ArrayLiteralExpressionSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -10589,7 +10657,7 @@ var TypeScript; }; OmittedExpressionSyntax.prototype.kind = function () { - return 222 /* OmittedExpression */; + return 223 /* OmittedExpression */; }; OmittedExpressionSyntax.prototype.childCount = function () { @@ -10636,7 +10704,7 @@ var TypeScript; }; ParenthesizedExpressionSyntax.prototype.kind = function () { - return 216 /* ParenthesizedExpression */; + return 217 /* ParenthesizedExpression */; }; ParenthesizedExpressionSyntax.prototype.childCount = function () { @@ -10673,7 +10741,7 @@ var TypeScript; }; ParenthesizedExpressionSyntax.create1 = function (expression) { - return new ParenthesizedExpressionSyntax(TypeScript.Syntax.token(72 /* OpenParenToken */), expression, TypeScript.Syntax.token(73 /* CloseParenToken */), false); + return new ParenthesizedExpressionSyntax(TypeScript.Syntax.token(73 /* OpenParenToken */), expression, TypeScript.Syntax.token(74 /* CloseParenToken */), false); }; ParenthesizedExpressionSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -10747,7 +10815,7 @@ var TypeScript; }; SimpleArrowFunctionExpressionSyntax.prototype.kind = function () { - return 218 /* SimpleArrowFunctionExpression */; + return 219 /* SimpleArrowFunctionExpression */; }; SimpleArrowFunctionExpressionSyntax.prototype.childCount = function () { @@ -10776,7 +10844,7 @@ var TypeScript; }; SimpleArrowFunctionExpressionSyntax.create1 = function (identifier, body) { - return new SimpleArrowFunctionExpressionSyntax(identifier, TypeScript.Syntax.token(85 /* EqualsGreaterThanToken */), body, false); + return new SimpleArrowFunctionExpressionSyntax(identifier, TypeScript.Syntax.token(86 /* EqualsGreaterThanToken */), body, false); }; SimpleArrowFunctionExpressionSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -10817,7 +10885,7 @@ var TypeScript; }; ParenthesizedArrowFunctionExpressionSyntax.prototype.kind = function () { - return 217 /* ParenthesizedArrowFunctionExpression */; + return 218 /* ParenthesizedArrowFunctionExpression */; }; ParenthesizedArrowFunctionExpressionSyntax.prototype.childCount = function () { @@ -10846,7 +10914,7 @@ var TypeScript; }; ParenthesizedArrowFunctionExpressionSyntax.create1 = function (body) { - return new ParenthesizedArrowFunctionExpressionSyntax(CallSignatureSyntax.create1(), TypeScript.Syntax.token(85 /* EqualsGreaterThanToken */), body, false); + return new ParenthesizedArrowFunctionExpressionSyntax(CallSignatureSyntax.create1(), TypeScript.Syntax.token(86 /* EqualsGreaterThanToken */), body, false); }; ParenthesizedArrowFunctionExpressionSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -10889,7 +10957,7 @@ var TypeScript; }; QualifiedNameSyntax.prototype.kind = function () { - return 121 /* QualifiedName */; + return 122 /* QualifiedName */; }; QualifiedNameSyntax.prototype.childCount = function () { @@ -10934,7 +11002,7 @@ var TypeScript; }; QualifiedNameSyntax.create1 = function (left, right) { - return new QualifiedNameSyntax(left, TypeScript.Syntax.token(76 /* DotToken */), right, false); + return new QualifiedNameSyntax(left, TypeScript.Syntax.token(77 /* DotToken */), right, false); }; QualifiedNameSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -10977,7 +11045,7 @@ var TypeScript; }; TypeArgumentListSyntax.prototype.kind = function () { - return 227 /* TypeArgumentList */; + return 228 /* TypeArgumentList */; }; TypeArgumentListSyntax.prototype.childCount = function () { @@ -11010,7 +11078,7 @@ var TypeScript; }; TypeArgumentListSyntax.create1 = function () { - return new TypeArgumentListSyntax(TypeScript.Syntax.token(80 /* LessThanToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(81 /* GreaterThanToken */), false); + return new TypeArgumentListSyntax(TypeScript.Syntax.token(81 /* LessThanToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(82 /* GreaterThanToken */), false); }; TypeArgumentListSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -11059,7 +11127,7 @@ var TypeScript; }; ConstructorTypeSyntax.prototype.kind = function () { - return 125 /* ConstructorType */; + return 126 /* ConstructorType */; }; ConstructorTypeSyntax.prototype.childCount = function () { @@ -11108,7 +11176,7 @@ var TypeScript; }; ConstructorTypeSyntax.create1 = function (type) { - return new ConstructorTypeSyntax(TypeScript.Syntax.token(31 /* NewKeyword */), null, ParameterListSyntax.create1(), TypeScript.Syntax.token(85 /* EqualsGreaterThanToken */), type, false); + return new ConstructorTypeSyntax(TypeScript.Syntax.token(31 /* NewKeyword */), null, ParameterListSyntax.create1(), TypeScript.Syntax.token(86 /* EqualsGreaterThanToken */), type, false); }; ConstructorTypeSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -11160,7 +11228,7 @@ var TypeScript; }; FunctionTypeSyntax.prototype.kind = function () { - return 123 /* FunctionType */; + return 124 /* FunctionType */; }; FunctionTypeSyntax.prototype.childCount = function () { @@ -11207,7 +11275,7 @@ var TypeScript; }; FunctionTypeSyntax.create1 = function (type) { - return new FunctionTypeSyntax(null, ParameterListSyntax.create1(), TypeScript.Syntax.token(85 /* EqualsGreaterThanToken */), type, false); + return new FunctionTypeSyntax(null, ParameterListSyntax.create1(), TypeScript.Syntax.token(86 /* EqualsGreaterThanToken */), type, false); }; FunctionTypeSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -11254,7 +11322,7 @@ var TypeScript; }; ObjectTypeSyntax.prototype.kind = function () { - return 122 /* ObjectType */; + return 123 /* ObjectType */; }; ObjectTypeSyntax.prototype.childCount = function () { @@ -11299,7 +11367,7 @@ var TypeScript; }; ObjectTypeSyntax.create1 = function () { - return new ObjectTypeSyntax(TypeScript.Syntax.token(70 /* OpenBraceToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(71 /* CloseBraceToken */), false); + return new ObjectTypeSyntax(TypeScript.Syntax.token(71 /* OpenBraceToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(72 /* CloseBraceToken */), false); }; ObjectTypeSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -11346,7 +11414,7 @@ var TypeScript; }; ArrayTypeSyntax.prototype.kind = function () { - return 124 /* ArrayType */; + return 125 /* ArrayType */; }; ArrayTypeSyntax.prototype.childCount = function () { @@ -11387,7 +11455,7 @@ var TypeScript; }; ArrayTypeSyntax.create1 = function (type) { - return new ArrayTypeSyntax(type, TypeScript.Syntax.token(74 /* OpenBracketToken */), TypeScript.Syntax.token(75 /* CloseBracketToken */), false); + return new ArrayTypeSyntax(type, TypeScript.Syntax.token(75 /* OpenBracketToken */), TypeScript.Syntax.token(76 /* CloseBracketToken */), false); }; ArrayTypeSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -11429,7 +11497,7 @@ var TypeScript; }; GenericTypeSyntax.prototype.kind = function () { - return 126 /* GenericType */; + return 127 /* GenericType */; }; GenericTypeSyntax.prototype.childCount = function () { @@ -11506,7 +11574,7 @@ var TypeScript; }; TypeQuerySyntax.prototype.kind = function () { - return 127 /* TypeQuery */; + return 128 /* TypeQuery */; }; TypeQuerySyntax.prototype.childCount = function () { @@ -11583,7 +11651,7 @@ var TypeScript; }; TypeAnnotationSyntax.prototype.kind = function () { - return 244 /* TypeAnnotation */; + return 245 /* TypeAnnotation */; }; TypeAnnotationSyntax.prototype.childCount = function () { @@ -11610,7 +11678,7 @@ var TypeScript; }; TypeAnnotationSyntax.create1 = function (type) { - return new TypeAnnotationSyntax(TypeScript.Syntax.token(106 /* ColonToken */), type, false); + return new TypeAnnotationSyntax(TypeScript.Syntax.token(107 /* ColonToken */), type, false); }; TypeAnnotationSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -11649,7 +11717,7 @@ var TypeScript; }; BlockSyntax.prototype.kind = function () { - return 145 /* Block */; + return 146 /* Block */; }; BlockSyntax.prototype.childCount = function () { @@ -11690,7 +11758,7 @@ var TypeScript; }; BlockSyntax.create1 = function () { - return new BlockSyntax(TypeScript.Syntax.token(70 /* OpenBraceToken */), TypeScript.Syntax.emptyList, TypeScript.Syntax.token(71 /* CloseBraceToken */), false); + return new BlockSyntax(TypeScript.Syntax.token(71 /* OpenBraceToken */), TypeScript.Syntax.emptyList, TypeScript.Syntax.token(72 /* CloseBraceToken */), false); }; BlockSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -11743,7 +11811,7 @@ var TypeScript; }; ParameterSyntax.prototype.kind = function () { - return 242 /* Parameter */; + return 243 /* Parameter */; }; ParameterSyntax.prototype.childCount = function () { @@ -11852,7 +11920,7 @@ var TypeScript; }; MemberAccessExpressionSyntax.prototype.kind = function () { - return 211 /* MemberAccessExpression */; + return 212 /* MemberAccessExpression */; }; MemberAccessExpressionSyntax.prototype.childCount = function () { @@ -11889,7 +11957,7 @@ var TypeScript; }; MemberAccessExpressionSyntax.create1 = function (expression, name) { - return new MemberAccessExpressionSyntax(expression, TypeScript.Syntax.token(76 /* DotToken */), name, false); + return new MemberAccessExpressionSyntax(expression, TypeScript.Syntax.token(77 /* DotToken */), name, false); }; MemberAccessExpressionSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -12014,7 +12082,7 @@ var TypeScript; }; ElementAccessExpressionSyntax.prototype.kind = function () { - return 220 /* ElementAccessExpression */; + return 221 /* ElementAccessExpression */; }; ElementAccessExpressionSyntax.prototype.childCount = function () { @@ -12053,7 +12121,7 @@ var TypeScript; }; ElementAccessExpressionSyntax.create1 = function (expression, argumentExpression) { - return new ElementAccessExpressionSyntax(expression, TypeScript.Syntax.token(74 /* OpenBracketToken */), argumentExpression, TypeScript.Syntax.token(75 /* CloseBracketToken */), false); + return new ElementAccessExpressionSyntax(expression, TypeScript.Syntax.token(75 /* OpenBracketToken */), argumentExpression, TypeScript.Syntax.token(76 /* CloseBracketToken */), false); }; ElementAccessExpressionSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -12105,7 +12173,7 @@ var TypeScript; }; InvocationExpressionSyntax.prototype.kind = function () { - return 212 /* InvocationExpression */; + return 213 /* InvocationExpression */; }; InvocationExpressionSyntax.prototype.childCount = function () { @@ -12186,7 +12254,7 @@ var TypeScript; }; ArgumentListSyntax.prototype.kind = function () { - return 225 /* ArgumentList */; + return 226 /* ArgumentList */; }; ArgumentListSyntax.prototype.childCount = function () { @@ -12221,7 +12289,7 @@ var TypeScript; }; ArgumentListSyntax.create1 = function () { - return new ArgumentListSyntax(null, TypeScript.Syntax.token(72 /* OpenParenToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(73 /* CloseParenToken */), false); + return new ArgumentListSyntax(null, TypeScript.Syntax.token(73 /* OpenParenToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(74 /* CloseParenToken */), false); }; ArgumentListSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -12364,7 +12432,7 @@ var TypeScript; }; ConditionalExpressionSyntax.prototype.kind = function () { - return 185 /* ConditionalExpression */; + return 186 /* ConditionalExpression */; }; ConditionalExpressionSyntax.prototype.childCount = function () { @@ -12401,7 +12469,7 @@ var TypeScript; }; ConditionalExpressionSyntax.create1 = function (condition, whenTrue, whenFalse) { - return new ConditionalExpressionSyntax(condition, TypeScript.Syntax.token(105 /* QuestionToken */), whenTrue, TypeScript.Syntax.token(106 /* ColonToken */), whenFalse, false); + return new ConditionalExpressionSyntax(condition, TypeScript.Syntax.token(106 /* QuestionToken */), whenTrue, TypeScript.Syntax.token(107 /* ColonToken */), whenFalse, false); }; ConditionalExpressionSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -12460,7 +12528,7 @@ var TypeScript; }; ConstructSignatureSyntax.prototype.kind = function () { - return 142 /* ConstructSignature */; + return 143 /* ConstructSignature */; }; ConstructSignatureSyntax.prototype.childCount = function () { @@ -12530,7 +12598,7 @@ var TypeScript; }; MethodSignatureSyntax.prototype.kind = function () { - return 144 /* MethodSignature */; + return 145 /* MethodSignature */; }; MethodSignatureSyntax.prototype.childCount = function () { @@ -12614,7 +12682,7 @@ var TypeScript; }; IndexSignatureSyntax.prototype.kind = function () { - return 143 /* IndexSignature */; + return 144 /* IndexSignature */; }; IndexSignatureSyntax.prototype.childCount = function () { @@ -12657,7 +12725,7 @@ var TypeScript; }; IndexSignatureSyntax.create1 = function (parameter) { - return new IndexSignatureSyntax(TypeScript.Syntax.token(74 /* OpenBracketToken */), parameter, TypeScript.Syntax.token(75 /* CloseBracketToken */), null, false); + return new IndexSignatureSyntax(TypeScript.Syntax.token(75 /* OpenBracketToken */), parameter, TypeScript.Syntax.token(76 /* CloseBracketToken */), null, false); }; IndexSignatureSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -12704,7 +12772,7 @@ var TypeScript; }; PropertySignatureSyntax.prototype.kind = function () { - return 140 /* PropertySignature */; + return 141 /* PropertySignature */; }; PropertySignatureSyntax.prototype.childCount = function () { @@ -12784,7 +12852,7 @@ var TypeScript; }; CallSignatureSyntax.prototype.kind = function () { - return 141 /* CallSignature */; + return 142 /* CallSignature */; }; CallSignatureSyntax.prototype.childCount = function () { @@ -12873,7 +12941,7 @@ var TypeScript; }; ParameterListSyntax.prototype.kind = function () { - return 226 /* ParameterList */; + return 227 /* ParameterList */; }; ParameterListSyntax.prototype.childCount = function () { @@ -12906,7 +12974,7 @@ var TypeScript; }; ParameterListSyntax.create1 = function () { - return new ParameterListSyntax(TypeScript.Syntax.token(72 /* OpenParenToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(73 /* CloseParenToken */), false); + return new ParameterListSyntax(TypeScript.Syntax.token(73 /* OpenParenToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(74 /* CloseParenToken */), false); }; ParameterListSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -12956,7 +13024,7 @@ var TypeScript; }; TypeParameterListSyntax.prototype.kind = function () { - return 228 /* TypeParameterList */; + return 229 /* TypeParameterList */; }; TypeParameterListSyntax.prototype.childCount = function () { @@ -12989,7 +13057,7 @@ var TypeScript; }; TypeParameterListSyntax.create1 = function () { - return new TypeParameterListSyntax(TypeScript.Syntax.token(80 /* LessThanToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(81 /* GreaterThanToken */), false); + return new TypeParameterListSyntax(TypeScript.Syntax.token(81 /* LessThanToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(82 /* GreaterThanToken */), false); }; TypeParameterListSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -13035,7 +13103,7 @@ var TypeScript; }; TypeParameterSyntax.prototype.kind = function () { - return 236 /* TypeParameter */; + return 237 /* TypeParameter */; }; TypeParameterSyntax.prototype.childCount = function () { @@ -13104,7 +13172,7 @@ var TypeScript; }; ConstraintSyntax.prototype.kind = function () { - return 237 /* Constraint */; + return 238 /* Constraint */; }; ConstraintSyntax.prototype.childCount = function () { @@ -13169,7 +13237,7 @@ var TypeScript; }; ElseClauseSyntax.prototype.kind = function () { - return 233 /* ElseClause */; + return 234 /* ElseClause */; }; ElseClauseSyntax.prototype.childCount = function () { @@ -13241,7 +13309,7 @@ var TypeScript; }; IfStatementSyntax.prototype.kind = function () { - return 146 /* IfStatement */; + return 147 /* IfStatement */; }; IfStatementSyntax.prototype.childCount = function () { @@ -13288,7 +13356,7 @@ var TypeScript; }; IfStatementSyntax.create1 = function (condition, statement) { - return new IfStatementSyntax(TypeScript.Syntax.token(28 /* IfKeyword */), TypeScript.Syntax.token(72 /* OpenParenToken */), condition, TypeScript.Syntax.token(73 /* CloseParenToken */), statement, null, false); + return new IfStatementSyntax(TypeScript.Syntax.token(28 /* IfKeyword */), TypeScript.Syntax.token(73 /* OpenParenToken */), condition, TypeScript.Syntax.token(74 /* CloseParenToken */), statement, null, false); }; IfStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -13351,7 +13419,7 @@ var TypeScript; }; ExpressionStatementSyntax.prototype.kind = function () { - return 148 /* ExpressionStatement */; + return 149 /* ExpressionStatement */; }; ExpressionStatementSyntax.prototype.childCount = function () { @@ -13386,7 +13454,7 @@ var TypeScript; }; ExpressionStatementSyntax.create1 = function (expression) { - return new ExpressionStatementSyntax(expression, TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new ExpressionStatementSyntax(expression, TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; ExpressionStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -13429,7 +13497,7 @@ var TypeScript; }; ConstructorDeclarationSyntax.prototype.kind = function () { - return 137 /* ConstructorDeclaration */; + return 138 /* ConstructorDeclaration */; }; ConstructorDeclarationSyntax.prototype.childCount = function () { @@ -13468,7 +13536,7 @@ var TypeScript; }; ConstructorDeclarationSyntax.create1 = function () { - return new ConstructorDeclarationSyntax(TypeScript.Syntax.token(62 /* ConstructorKeyword */), ParameterListSyntax.create1(), null, null, false); + return new ConstructorDeclarationSyntax(TypeScript.Syntax.token(63 /* ConstructorKeyword */), ParameterListSyntax.create1(), null, null, false); }; ConstructorDeclarationSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -13517,7 +13585,7 @@ var TypeScript; }; MemberFunctionDeclarationSyntax.prototype.kind = function () { - return 135 /* MemberFunctionDeclaration */; + return 136 /* MemberFunctionDeclaration */; }; MemberFunctionDeclarationSyntax.prototype.childCount = function () { @@ -13648,7 +13716,7 @@ var TypeScript; }; GetMemberAccessorDeclarationSyntax.prototype.kind = function () { - return 138 /* GetMemberAccessorDeclaration */; + return 139 /* GetMemberAccessorDeclaration */; }; GetMemberAccessorDeclarationSyntax.prototype.childCount = function () { @@ -13687,7 +13755,7 @@ var TypeScript; }; GetMemberAccessorDeclarationSyntax.create1 = function (propertyName) { - return new GetMemberAccessorDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(64 /* GetKeyword */), propertyName, ParameterListSyntax.create1(), null, BlockSyntax.create1(), false); + return new GetMemberAccessorDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(65 /* GetKeyword */), propertyName, ParameterListSyntax.create1(), null, BlockSyntax.create1(), false); }; GetMemberAccessorDeclarationSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -13744,7 +13812,7 @@ var TypeScript; }; SetMemberAccessorDeclarationSyntax.prototype.kind = function () { - return 139 /* SetMemberAccessorDeclaration */; + return 140 /* SetMemberAccessorDeclaration */; }; SetMemberAccessorDeclarationSyntax.prototype.childCount = function () { @@ -13781,7 +13849,7 @@ var TypeScript; }; SetMemberAccessorDeclarationSyntax.create1 = function (propertyName) { - return new SetMemberAccessorDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(68 /* SetKeyword */), propertyName, ParameterListSyntax.create1(), BlockSyntax.create1(), false); + return new SetMemberAccessorDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(69 /* SetKeyword */), propertyName, ParameterListSyntax.create1(), BlockSyntax.create1(), false); }; SetMemberAccessorDeclarationSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -13836,7 +13904,7 @@ var TypeScript; }; MemberVariableDeclarationSyntax.prototype.kind = function () { - return 136 /* MemberVariableDeclaration */; + return 137 /* MemberVariableDeclaration */; }; MemberVariableDeclarationSyntax.prototype.childCount = function () { @@ -13877,7 +13945,7 @@ var TypeScript; }; MemberVariableDeclarationSyntax.create1 = function (variableDeclarator) { - return new MemberVariableDeclarationSyntax(TypeScript.Syntax.emptyList, variableDeclarator, TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new MemberVariableDeclarationSyntax(TypeScript.Syntax.emptyList, variableDeclarator, TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; MemberVariableDeclarationSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -13924,7 +13992,7 @@ var TypeScript; }; ThrowStatementSyntax.prototype.kind = function () { - return 156 /* ThrowStatement */; + return 157 /* ThrowStatement */; }; ThrowStatementSyntax.prototype.childCount = function () { @@ -13961,7 +14029,7 @@ var TypeScript; }; ThrowStatementSyntax.create1 = function (expression) { - return new ThrowStatementSyntax(TypeScript.Syntax.token(36 /* ThrowKeyword */), expression, TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new ThrowStatementSyntax(TypeScript.Syntax.token(36 /* ThrowKeyword */), expression, TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; ThrowStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -14007,7 +14075,7 @@ var TypeScript; }; ReturnStatementSyntax.prototype.kind = function () { - return 149 /* ReturnStatement */; + return 150 /* ReturnStatement */; }; ReturnStatementSyntax.prototype.childCount = function () { @@ -14048,7 +14116,7 @@ var TypeScript; }; ReturnStatementSyntax.create1 = function () { - return new ReturnStatementSyntax(TypeScript.Syntax.token(33 /* ReturnKeyword */), null, TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new ReturnStatementSyntax(TypeScript.Syntax.token(33 /* ReturnKeyword */), null, TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; ReturnStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -14094,7 +14162,7 @@ var TypeScript; }; ObjectCreationExpressionSyntax.prototype.kind = function () { - return 215 /* ObjectCreationExpression */; + return 216 /* ObjectCreationExpression */; }; ObjectCreationExpressionSyntax.prototype.childCount = function () { @@ -14188,7 +14256,7 @@ var TypeScript; }; SwitchStatementSyntax.prototype.kind = function () { - return 150 /* SwitchStatement */; + return 151 /* SwitchStatement */; }; SwitchStatementSyntax.prototype.childCount = function () { @@ -14237,7 +14305,7 @@ var TypeScript; }; SwitchStatementSyntax.create1 = function (expression) { - return new SwitchStatementSyntax(TypeScript.Syntax.token(34 /* SwitchKeyword */), TypeScript.Syntax.token(72 /* OpenParenToken */), expression, TypeScript.Syntax.token(73 /* CloseParenToken */), TypeScript.Syntax.token(70 /* OpenBraceToken */), TypeScript.Syntax.emptyList, TypeScript.Syntax.token(71 /* CloseBraceToken */), false); + return new SwitchStatementSyntax(TypeScript.Syntax.token(34 /* SwitchKeyword */), TypeScript.Syntax.token(73 /* OpenParenToken */), expression, TypeScript.Syntax.token(74 /* CloseParenToken */), TypeScript.Syntax.token(71 /* OpenBraceToken */), TypeScript.Syntax.emptyList, TypeScript.Syntax.token(72 /* CloseBraceToken */), false); }; SwitchStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -14331,7 +14399,7 @@ var TypeScript; }; CaseSwitchClauseSyntax.prototype.kind = function () { - return 231 /* CaseSwitchClause */; + return 232 /* CaseSwitchClause */; }; CaseSwitchClauseSyntax.prototype.childCount = function () { @@ -14366,7 +14434,7 @@ var TypeScript; }; CaseSwitchClauseSyntax.create1 = function (expression) { - return new CaseSwitchClauseSyntax(TypeScript.Syntax.token(16 /* CaseKeyword */), expression, TypeScript.Syntax.token(106 /* ColonToken */), TypeScript.Syntax.emptyList, false); + return new CaseSwitchClauseSyntax(TypeScript.Syntax.token(16 /* CaseKeyword */), expression, TypeScript.Syntax.token(107 /* ColonToken */), TypeScript.Syntax.emptyList, false); }; CaseSwitchClauseSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -14421,7 +14489,7 @@ var TypeScript; }; DefaultSwitchClauseSyntax.prototype.kind = function () { - return 232 /* DefaultSwitchClause */; + return 233 /* DefaultSwitchClause */; }; DefaultSwitchClauseSyntax.prototype.childCount = function () { @@ -14454,7 +14522,7 @@ var TypeScript; }; DefaultSwitchClauseSyntax.create1 = function () { - return new DefaultSwitchClauseSyntax(TypeScript.Syntax.token(20 /* DefaultKeyword */), TypeScript.Syntax.token(106 /* ColonToken */), TypeScript.Syntax.emptyList, false); + return new DefaultSwitchClauseSyntax(TypeScript.Syntax.token(20 /* DefaultKeyword */), TypeScript.Syntax.token(107 /* ColonToken */), TypeScript.Syntax.emptyList, false); }; DefaultSwitchClauseSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -14504,7 +14572,7 @@ var TypeScript; }; BreakStatementSyntax.prototype.kind = function () { - return 151 /* BreakStatement */; + return 152 /* BreakStatement */; }; BreakStatementSyntax.prototype.childCount = function () { @@ -14545,7 +14613,7 @@ var TypeScript; }; BreakStatementSyntax.create1 = function () { - return new BreakStatementSyntax(TypeScript.Syntax.token(15 /* BreakKeyword */), null, TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new BreakStatementSyntax(TypeScript.Syntax.token(15 /* BreakKeyword */), null, TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; BreakStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -14588,7 +14656,7 @@ var TypeScript; }; ContinueStatementSyntax.prototype.kind = function () { - return 152 /* ContinueStatement */; + return 153 /* ContinueStatement */; }; ContinueStatementSyntax.prototype.childCount = function () { @@ -14629,7 +14697,7 @@ var TypeScript; }; ContinueStatementSyntax.create1 = function () { - return new ContinueStatementSyntax(TypeScript.Syntax.token(18 /* ContinueKeyword */), null, TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new ContinueStatementSyntax(TypeScript.Syntax.token(18 /* ContinueKeyword */), null, TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; ContinueStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -14727,7 +14795,7 @@ var TypeScript; }; ForStatementSyntax.prototype.kind = function () { - return 153 /* ForStatement */; + return 154 /* ForStatement */; }; ForStatementSyntax.prototype.childCount = function () { @@ -14774,7 +14842,7 @@ var TypeScript; }; ForStatementSyntax.create1 = function (statement) { - return new ForStatementSyntax(TypeScript.Syntax.token(26 /* ForKeyword */), TypeScript.Syntax.token(72 /* OpenParenToken */), null, null, TypeScript.Syntax.token(78 /* SemicolonToken */), null, TypeScript.Syntax.token(78 /* SemicolonToken */), null, TypeScript.Syntax.token(73 /* CloseParenToken */), statement, false); + return new ForStatementSyntax(TypeScript.Syntax.token(26 /* ForKeyword */), TypeScript.Syntax.token(73 /* OpenParenToken */), null, null, TypeScript.Syntax.token(79 /* SemicolonToken */), null, TypeScript.Syntax.token(79 /* SemicolonToken */), null, TypeScript.Syntax.token(74 /* CloseParenToken */), statement, false); }; ForStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -14860,7 +14928,7 @@ var TypeScript; }; ForInStatementSyntax.prototype.kind = function () { - return 154 /* ForInStatement */; + return 155 /* ForInStatement */; }; ForInStatementSyntax.prototype.childCount = function () { @@ -14903,7 +14971,7 @@ var TypeScript; }; ForInStatementSyntax.create1 = function (expression, statement) { - return new ForInStatementSyntax(TypeScript.Syntax.token(26 /* ForKeyword */), TypeScript.Syntax.token(72 /* OpenParenToken */), null, null, TypeScript.Syntax.token(29 /* InKeyword */), expression, TypeScript.Syntax.token(73 /* CloseParenToken */), statement, false); + return new ForInStatementSyntax(TypeScript.Syntax.token(26 /* ForKeyword */), TypeScript.Syntax.token(73 /* OpenParenToken */), null, null, TypeScript.Syntax.token(29 /* InKeyword */), expression, TypeScript.Syntax.token(74 /* CloseParenToken */), statement, false); }; ForInStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -14977,7 +15045,7 @@ var TypeScript; }; WhileStatementSyntax.prototype.kind = function () { - return 157 /* WhileStatement */; + return 158 /* WhileStatement */; }; WhileStatementSyntax.prototype.childCount = function () { @@ -15010,7 +15078,7 @@ var TypeScript; }; WhileStatementSyntax.create1 = function (condition, statement) { - return new WhileStatementSyntax(TypeScript.Syntax.token(42 /* WhileKeyword */), TypeScript.Syntax.token(72 /* OpenParenToken */), condition, TypeScript.Syntax.token(73 /* CloseParenToken */), statement, false); + return new WhileStatementSyntax(TypeScript.Syntax.token(42 /* WhileKeyword */), TypeScript.Syntax.token(73 /* OpenParenToken */), condition, TypeScript.Syntax.token(74 /* CloseParenToken */), statement, false); }; WhileStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -15069,7 +15137,7 @@ var TypeScript; }; WithStatementSyntax.prototype.kind = function () { - return 162 /* WithStatement */; + return 163 /* WithStatement */; }; WithStatementSyntax.prototype.childCount = function () { @@ -15110,7 +15178,7 @@ var TypeScript; }; WithStatementSyntax.create1 = function (condition, statement) { - return new WithStatementSyntax(TypeScript.Syntax.token(43 /* WithKeyword */), TypeScript.Syntax.token(72 /* OpenParenToken */), condition, TypeScript.Syntax.token(73 /* CloseParenToken */), statement, false); + return new WithStatementSyntax(TypeScript.Syntax.token(43 /* WithKeyword */), TypeScript.Syntax.token(73 /* OpenParenToken */), condition, TypeScript.Syntax.token(74 /* CloseParenToken */), statement, false); }; WithStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -15170,7 +15238,7 @@ var TypeScript; }; EnumDeclarationSyntax.prototype.kind = function () { - return 132 /* EnumDeclaration */; + return 133 /* EnumDeclaration */; }; EnumDeclarationSyntax.prototype.childCount = function () { @@ -15213,7 +15281,7 @@ var TypeScript; }; EnumDeclarationSyntax.create1 = function (identifier) { - return new EnumDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(46 /* EnumKeyword */), identifier, TypeScript.Syntax.token(70 /* OpenBraceToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(71 /* CloseBraceToken */), false); + return new EnumDeclarationSyntax(TypeScript.Syntax.emptyList, TypeScript.Syntax.token(46 /* EnumKeyword */), identifier, TypeScript.Syntax.token(71 /* OpenBraceToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(72 /* CloseBraceToken */), false); }; EnumDeclarationSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -15275,7 +15343,7 @@ var TypeScript; }; EnumElementSyntax.prototype.kind = function () { - return 243 /* EnumElement */; + return 244 /* EnumElement */; }; EnumElementSyntax.prototype.childCount = function () { @@ -15349,7 +15417,7 @@ var TypeScript; }; CastExpressionSyntax.prototype.kind = function () { - return 219 /* CastExpression */; + return 220 /* CastExpression */; }; CastExpressionSyntax.prototype.childCount = function () { @@ -15388,7 +15456,7 @@ var TypeScript; }; CastExpressionSyntax.create1 = function (type, expression) { - return new CastExpressionSyntax(TypeScript.Syntax.token(80 /* LessThanToken */), type, TypeScript.Syntax.token(81 /* GreaterThanToken */), expression, false); + return new CastExpressionSyntax(TypeScript.Syntax.token(81 /* LessThanToken */), type, TypeScript.Syntax.token(82 /* GreaterThanToken */), expression, false); }; CastExpressionSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -15435,7 +15503,7 @@ var TypeScript; }; ObjectLiteralExpressionSyntax.prototype.kind = function () { - return 214 /* ObjectLiteralExpression */; + return 215 /* ObjectLiteralExpression */; }; ObjectLiteralExpressionSyntax.prototype.childCount = function () { @@ -15476,7 +15544,7 @@ var TypeScript; }; ObjectLiteralExpressionSyntax.create1 = function () { - return new ObjectLiteralExpressionSyntax(TypeScript.Syntax.token(70 /* OpenBraceToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(71 /* CloseBraceToken */), false); + return new ObjectLiteralExpressionSyntax(TypeScript.Syntax.token(71 /* OpenBraceToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.token(72 /* CloseBraceToken */), false); }; ObjectLiteralExpressionSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -15546,7 +15614,7 @@ var TypeScript; }; SimplePropertyAssignmentSyntax.prototype.kind = function () { - return 238 /* SimplePropertyAssignment */; + return 239 /* SimplePropertyAssignment */; }; SimplePropertyAssignmentSyntax.prototype.childCount = function () { @@ -15575,7 +15643,7 @@ var TypeScript; }; SimplePropertyAssignmentSyntax.create1 = function (propertyName, expression) { - return new SimplePropertyAssignmentSyntax(propertyName, TypeScript.Syntax.token(106 /* ColonToken */), expression, false); + return new SimplePropertyAssignmentSyntax(propertyName, TypeScript.Syntax.token(107 /* ColonToken */), expression, false); }; SimplePropertyAssignmentSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -15620,7 +15688,7 @@ var TypeScript; }; FunctionPropertyAssignmentSyntax.prototype.kind = function () { - return 241 /* FunctionPropertyAssignment */; + return 242 /* FunctionPropertyAssignment */; }; FunctionPropertyAssignmentSyntax.prototype.childCount = function () { @@ -15720,7 +15788,7 @@ var TypeScript; }; GetAccessorPropertyAssignmentSyntax.prototype.kind = function () { - return 239 /* GetAccessorPropertyAssignment */; + return 240 /* GetAccessorPropertyAssignment */; }; GetAccessorPropertyAssignmentSyntax.prototype.childCount = function () { @@ -15759,7 +15827,7 @@ var TypeScript; }; GetAccessorPropertyAssignmentSyntax.create1 = function (propertyName) { - return new GetAccessorPropertyAssignmentSyntax(TypeScript.Syntax.token(64 /* GetKeyword */), propertyName, TypeScript.Syntax.token(72 /* OpenParenToken */), TypeScript.Syntax.token(73 /* CloseParenToken */), null, BlockSyntax.create1(), false); + return new GetAccessorPropertyAssignmentSyntax(TypeScript.Syntax.token(65 /* GetKeyword */), propertyName, TypeScript.Syntax.token(73 /* OpenParenToken */), TypeScript.Syntax.token(74 /* CloseParenToken */), null, BlockSyntax.create1(), false); }; GetAccessorPropertyAssignmentSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -15819,7 +15887,7 @@ var TypeScript; }; SetAccessorPropertyAssignmentSyntax.prototype.kind = function () { - return 240 /* SetAccessorPropertyAssignment */; + return 241 /* SetAccessorPropertyAssignment */; }; SetAccessorPropertyAssignmentSyntax.prototype.childCount = function () { @@ -15854,7 +15922,7 @@ var TypeScript; }; SetAccessorPropertyAssignmentSyntax.create1 = function (propertyName, parameter) { - return new SetAccessorPropertyAssignmentSyntax(TypeScript.Syntax.token(68 /* SetKeyword */), propertyName, TypeScript.Syntax.token(72 /* OpenParenToken */), parameter, TypeScript.Syntax.token(73 /* CloseParenToken */), BlockSyntax.create1(), false); + return new SetAccessorPropertyAssignmentSyntax(TypeScript.Syntax.token(69 /* SetKeyword */), propertyName, TypeScript.Syntax.token(73 /* OpenParenToken */), parameter, TypeScript.Syntax.token(74 /* CloseParenToken */), BlockSyntax.create1(), false); }; SetAccessorPropertyAssignmentSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -15916,7 +15984,7 @@ var TypeScript; }; FunctionExpressionSyntax.prototype.kind = function () { - return 221 /* FunctionExpression */; + return 222 /* FunctionExpression */; }; FunctionExpressionSyntax.prototype.childCount = function () { @@ -16010,7 +16078,7 @@ var TypeScript; }; EmptyStatementSyntax.prototype.kind = function () { - return 155 /* EmptyStatement */; + return 156 /* EmptyStatement */; }; EmptyStatementSyntax.prototype.childCount = function () { @@ -16043,7 +16111,7 @@ var TypeScript; }; EmptyStatementSyntax.create1 = function () { - return new EmptyStatementSyntax(TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new EmptyStatementSyntax(TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; EmptyStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -16079,7 +16147,7 @@ var TypeScript; }; TryStatementSyntax.prototype.kind = function () { - return 158 /* TryStatement */; + return 159 /* TryStatement */; }; TryStatementSyntax.prototype.childCount = function () { @@ -16181,7 +16249,7 @@ var TypeScript; }; CatchClauseSyntax.prototype.kind = function () { - return 234 /* CatchClause */; + return 235 /* CatchClause */; }; CatchClauseSyntax.prototype.childCount = function () { @@ -16220,7 +16288,7 @@ var TypeScript; }; CatchClauseSyntax.create1 = function (identifier) { - return new CatchClauseSyntax(TypeScript.Syntax.token(17 /* CatchKeyword */), TypeScript.Syntax.token(72 /* OpenParenToken */), identifier, null, TypeScript.Syntax.token(73 /* CloseParenToken */), BlockSyntax.create1(), false); + return new CatchClauseSyntax(TypeScript.Syntax.token(17 /* CatchKeyword */), TypeScript.Syntax.token(73 /* OpenParenToken */), identifier, null, TypeScript.Syntax.token(74 /* CloseParenToken */), BlockSyntax.create1(), false); }; CatchClauseSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -16280,7 +16348,7 @@ var TypeScript; }; FinallyClauseSyntax.prototype.kind = function () { - return 235 /* FinallyClause */; + return 236 /* FinallyClause */; }; FinallyClauseSyntax.prototype.childCount = function () { @@ -16349,7 +16417,7 @@ var TypeScript; }; LabeledStatementSyntax.prototype.kind = function () { - return 159 /* LabeledStatement */; + return 160 /* LabeledStatement */; }; LabeledStatementSyntax.prototype.childCount = function () { @@ -16386,7 +16454,7 @@ var TypeScript; }; LabeledStatementSyntax.create1 = function (identifier, statement) { - return new LabeledStatementSyntax(identifier, TypeScript.Syntax.token(106 /* ColonToken */), statement, false); + return new LabeledStatementSyntax(identifier, TypeScript.Syntax.token(107 /* ColonToken */), statement, false); }; LabeledStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -16433,7 +16501,7 @@ var TypeScript; }; DoStatementSyntax.prototype.kind = function () { - return 160 /* DoStatement */; + return 161 /* DoStatement */; }; DoStatementSyntax.prototype.childCount = function () { @@ -16470,7 +16538,7 @@ var TypeScript; }; DoStatementSyntax.create1 = function (statement, condition) { - return new DoStatementSyntax(TypeScript.Syntax.token(22 /* DoKeyword */), statement, TypeScript.Syntax.token(42 /* WhileKeyword */), TypeScript.Syntax.token(72 /* OpenParenToken */), condition, TypeScript.Syntax.token(73 /* CloseParenToken */), TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new DoStatementSyntax(TypeScript.Syntax.token(22 /* DoKeyword */), statement, TypeScript.Syntax.token(42 /* WhileKeyword */), TypeScript.Syntax.token(73 /* OpenParenToken */), condition, TypeScript.Syntax.token(74 /* CloseParenToken */), TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; DoStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -16534,7 +16602,7 @@ var TypeScript; }; TypeOfExpressionSyntax.prototype.kind = function () { - return 170 /* TypeOfExpression */; + return 171 /* TypeOfExpression */; }; TypeOfExpressionSyntax.prototype.childCount = function () { @@ -16610,7 +16678,7 @@ var TypeScript; }; DeleteExpressionSyntax.prototype.kind = function () { - return 169 /* DeleteExpression */; + return 170 /* DeleteExpression */; }; DeleteExpressionSyntax.prototype.childCount = function () { @@ -16686,7 +16754,7 @@ var TypeScript; }; VoidExpressionSyntax.prototype.kind = function () { - return 171 /* VoidExpression */; + return 172 /* VoidExpression */; }; VoidExpressionSyntax.prototype.childCount = function () { @@ -16762,7 +16830,7 @@ var TypeScript; }; DebuggerStatementSyntax.prototype.kind = function () { - return 161 /* DebuggerStatement */; + return 162 /* DebuggerStatement */; }; DebuggerStatementSyntax.prototype.childCount = function () { @@ -16797,7 +16865,7 @@ var TypeScript; }; DebuggerStatementSyntax.create1 = function () { - return new DebuggerStatementSyntax(TypeScript.Syntax.token(19 /* DebuggerKeyword */), TypeScript.Syntax.token(78 /* SemicolonToken */), false); + return new DebuggerStatementSyntax(TypeScript.Syntax.token(19 /* DebuggerKeyword */), TypeScript.Syntax.token(79 /* SemicolonToken */), false); }; DebuggerStatementSyntax.prototype.withLeadingTrivia = function (trivia) { @@ -16889,7 +16957,7 @@ var TypeScript; }; SyntaxRewriter.prototype.visitExternalModuleReference = function (node) { - return node.update(this.visitToken(node.requireKeyword), this.visitToken(node.openParenToken), this.visitToken(node.stringLiteral), this.visitToken(node.closeParenToken)); + return node.update(this.visitToken(node.moduleOrRequireKeyword), this.visitToken(node.openParenToken), this.visitToken(node.stringLiteral), this.visitToken(node.closeParenToken)); }; SyntaxRewriter.prototype.visitModuleNameModuleReference = function (node) { @@ -19709,11 +19777,11 @@ var TypeScript; SyntaxUtilities.isAngleBracket = function (positionedElement) { var element = positionedElement.element(); var parent = positionedElement.parentElement(); - if (parent !== null && (element.kind() === 80 /* LessThanToken */ || element.kind() === 81 /* GreaterThanToken */)) { + if (parent !== null && (element.kind() === 81 /* LessThanToken */ || element.kind() === 82 /* GreaterThanToken */)) { switch (parent.kind()) { - case 227 /* TypeArgumentList */: - case 228 /* TypeParameterList */: - case 219 /* CastExpression */: + case 228 /* TypeArgumentList */: + case 229 /* TypeParameterList */: + case 220 /* CastExpression */: return true; } } @@ -19742,13 +19810,13 @@ var TypeScript; SyntaxUtilities.getExportKeyword = function (moduleElement) { switch (moduleElement.kind()) { - case 130 /* ModuleDeclaration */: - case 131 /* ClassDeclaration */: - case 129 /* FunctionDeclaration */: - case 147 /* VariableStatement */: - case 132 /* EnumDeclaration */: - case 128 /* InterfaceDeclaration */: - case 133 /* ImportDeclaration */: + case 131 /* ModuleDeclaration */: + case 132 /* ClassDeclaration */: + case 130 /* FunctionDeclaration */: + case 148 /* VariableStatement */: + case 133 /* EnumDeclaration */: + case 129 /* InterfaceDeclaration */: + case 134 /* ImportDeclaration */: return SyntaxUtilities.getToken((moduleElement).modifiers, 47 /* ExportKeyword */); default: return null; @@ -19762,26 +19830,26 @@ var TypeScript; var node = positionNode.node(); switch (node.kind()) { - case 130 /* ModuleDeclaration */: - case 131 /* ClassDeclaration */: - case 129 /* FunctionDeclaration */: - case 147 /* VariableStatement */: - case 132 /* EnumDeclaration */: - if (SyntaxUtilities.containsToken((node).modifiers, 63 /* DeclareKeyword */)) { + case 131 /* ModuleDeclaration */: + case 132 /* ClassDeclaration */: + case 130 /* FunctionDeclaration */: + case 148 /* VariableStatement */: + case 133 /* EnumDeclaration */: + if (SyntaxUtilities.containsToken((node).modifiers, 64 /* DeclareKeyword */)) { return true; } - case 133 /* ImportDeclaration */: - case 137 /* ConstructorDeclaration */: - case 135 /* MemberFunctionDeclaration */: - case 138 /* GetMemberAccessorDeclaration */: - case 139 /* SetMemberAccessorDeclaration */: - case 136 /* MemberVariableDeclaration */: + case 134 /* ImportDeclaration */: + case 138 /* ConstructorDeclaration */: + case 136 /* MemberFunctionDeclaration */: + case 139 /* GetMemberAccessorDeclaration */: + case 140 /* SetMemberAccessorDeclaration */: + case 137 /* MemberVariableDeclaration */: if (node.isClassElement() || node.isModuleElement()) { return SyntaxUtilities.isAmbientDeclarationSyntax(positionNode.containingNode()); } - case 243 /* EnumElement */: + case 244 /* EnumElement */: return SyntaxUtilities.isAmbientDeclarationSyntax(positionNode.containingNode().containingNode()); default: @@ -20215,7 +20283,7 @@ var TypeScript; }; SyntaxWalker.prototype.visitExternalModuleReference = function (node) { - this.visitToken(node.requireKeyword); + this.visitToken(node.moduleOrRequireKeyword); this.visitToken(node.openParenToken); this.visitToken(node.stringLiteral); this.visitToken(node.closeParenToken); @@ -21627,7 +21695,7 @@ var TypeScript; return !this.isInStrictMode; } - return tokenKind <= 69 /* LastTypeScriptKeyword */; + return tokenKind <= 70 /* LastTypeScriptKeyword */; } return false; @@ -21671,7 +21739,7 @@ var TypeScript; return true; } - if (token.tokenKind === 71 /* CloseBraceToken */) { + if (token.tokenKind === 72 /* CloseBraceToken */) { return true; } @@ -21689,7 +21757,7 @@ var TypeScript; ParserImpl.prototype.canEatExplicitOrAutomaticSemicolon = function (allowWithoutNewline) { var token = this.currentToken(); - if (token.tokenKind === 78 /* SemicolonToken */) { + if (token.tokenKind === 79 /* SemicolonToken */) { return true; } @@ -21699,12 +21767,12 @@ var TypeScript; ParserImpl.prototype.eatExplicitOrAutomaticSemicolon = function (allowWithoutNewline) { var token = this.currentToken(); - if (token.tokenKind === 78 /* SemicolonToken */) { - return this.eatToken(78 /* SemicolonToken */); + if (token.tokenKind === 79 /* SemicolonToken */) { + return this.eatToken(79 /* SemicolonToken */); } if (this.canEatAutomaticSemicolon(allowWithoutNewline)) { - var semicolonToken = TypeScript.Syntax.emptyToken(78 /* SemicolonToken */); + var semicolonToken = TypeScript.Syntax.emptyToken(79 /* SemicolonToken */); if (!this.parseOptions.allowAutomaticSemicolonInsertion()) { this.addDiagnostic(new TypeScript.Diagnostic(this.fileName, this.previousTokenEnd(), 0, TypeScript.DiagnosticCode.Automatic_semicolon_insertion_not_allowed, null)); @@ -21713,7 +21781,7 @@ var TypeScript; return semicolonToken; } - return this.eatToken(78 /* SemicolonToken */); + return this.eatToken(79 /* SemicolonToken */); }; ParserImpl.prototype.isKeyword = function (kind) { @@ -21753,78 +21821,78 @@ var TypeScript; ParserImpl.getPrecedence = function (expressionKind) { switch (expressionKind) { - case 172 /* CommaExpression */: + case 173 /* CommaExpression */: return 1 /* CommaExpressionPrecedence */; - case 173 /* AssignmentExpression */: - case 174 /* AddAssignmentExpression */: - case 175 /* SubtractAssignmentExpression */: - case 176 /* MultiplyAssignmentExpression */: - case 177 /* DivideAssignmentExpression */: - case 178 /* ModuloAssignmentExpression */: - case 179 /* AndAssignmentExpression */: - case 180 /* ExclusiveOrAssignmentExpression */: - case 181 /* OrAssignmentExpression */: - case 182 /* LeftShiftAssignmentExpression */: - case 183 /* SignedRightShiftAssignmentExpression */: - case 184 /* UnsignedRightShiftAssignmentExpression */: + case 174 /* AssignmentExpression */: + case 175 /* AddAssignmentExpression */: + case 176 /* SubtractAssignmentExpression */: + case 177 /* MultiplyAssignmentExpression */: + case 178 /* DivideAssignmentExpression */: + case 179 /* ModuloAssignmentExpression */: + case 180 /* AndAssignmentExpression */: + case 181 /* ExclusiveOrAssignmentExpression */: + case 182 /* OrAssignmentExpression */: + case 183 /* LeftShiftAssignmentExpression */: + case 184 /* SignedRightShiftAssignmentExpression */: + case 185 /* UnsignedRightShiftAssignmentExpression */: return 2 /* AssignmentExpressionPrecedence */; - case 185 /* ConditionalExpression */: + case 186 /* ConditionalExpression */: return 3 /* ConditionalExpressionPrecedence */; - case 186 /* LogicalOrExpression */: + case 187 /* LogicalOrExpression */: return 5 /* LogicalOrExpressionPrecedence */; - case 187 /* LogicalAndExpression */: + case 188 /* LogicalAndExpression */: return 6 /* LogicalAndExpressionPrecedence */; - case 188 /* BitwiseOrExpression */: + case 189 /* BitwiseOrExpression */: return 7 /* BitwiseOrExpressionPrecedence */; - case 189 /* BitwiseExclusiveOrExpression */: + case 190 /* BitwiseExclusiveOrExpression */: return 8 /* BitwiseExclusiveOrExpressionPrecedence */; - case 190 /* BitwiseAndExpression */: + case 191 /* BitwiseAndExpression */: return 9 /* BitwiseAndExpressionPrecedence */; - case 191 /* EqualsWithTypeConversionExpression */: - case 192 /* NotEqualsWithTypeConversionExpression */: - case 193 /* EqualsExpression */: - case 194 /* NotEqualsExpression */: + case 192 /* EqualsWithTypeConversionExpression */: + case 193 /* NotEqualsWithTypeConversionExpression */: + case 194 /* EqualsExpression */: + case 195 /* NotEqualsExpression */: return 10 /* EqualityExpressionPrecedence */; - case 195 /* LessThanExpression */: - case 196 /* GreaterThanExpression */: - case 197 /* LessThanOrEqualExpression */: - case 198 /* GreaterThanOrEqualExpression */: - case 199 /* InstanceOfExpression */: - case 200 /* InExpression */: + case 196 /* LessThanExpression */: + case 197 /* GreaterThanExpression */: + case 198 /* LessThanOrEqualExpression */: + case 199 /* GreaterThanOrEqualExpression */: + case 200 /* InstanceOfExpression */: + case 201 /* InExpression */: return 11 /* RelationalExpressionPrecedence */; - case 201 /* LeftShiftExpression */: - case 202 /* SignedRightShiftExpression */: - case 203 /* UnsignedRightShiftExpression */: + case 202 /* LeftShiftExpression */: + case 203 /* SignedRightShiftExpression */: + case 204 /* UnsignedRightShiftExpression */: return 12 /* ShiftExpressionPrecdence */; - case 207 /* AddExpression */: - case 208 /* SubtractExpression */: + case 208 /* AddExpression */: + case 209 /* SubtractExpression */: return 13 /* AdditiveExpressionPrecedence */; - case 204 /* MultiplyExpression */: - case 205 /* DivideExpression */: - case 206 /* ModuloExpression */: + case 205 /* MultiplyExpression */: + case 206 /* DivideExpression */: + case 207 /* ModuloExpression */: return 14 /* MultiplicativeExpressionPrecedence */; - case 163 /* PlusExpression */: - case 164 /* NegateExpression */: - case 165 /* BitwiseNotExpression */: - case 166 /* LogicalNotExpression */: - case 169 /* DeleteExpression */: - case 170 /* TypeOfExpression */: - case 171 /* VoidExpression */: - case 167 /* PreIncrementExpression */: - case 168 /* PreDecrementExpression */: + case 164 /* PlusExpression */: + case 165 /* NegateExpression */: + case 166 /* BitwiseNotExpression */: + case 167 /* LogicalNotExpression */: + case 170 /* DeleteExpression */: + case 171 /* TypeOfExpression */: + case 172 /* VoidExpression */: + case 168 /* PreIncrementExpression */: + case 169 /* PreDecrementExpression */: return 15 /* UnaryExpressionPrecedence */; } @@ -21998,7 +22066,7 @@ var TypeScript; var modifiers = this.parseModifiers(); var importKeyword = this.eatKeyword(49 /* ImportKeyword */); var identifier = this.eatIdentifierToken(); - var equalsToken = this.eatToken(107 /* EqualsToken */); + var equalsToken = this.eatToken(108 /* EqualsToken */); var moduleReference = this.parseModuleReference(); var semicolonToken = this.eatExplicitOrAutomaticSemicolon(false); @@ -22006,12 +22074,12 @@ var TypeScript; }; ParserImpl.prototype.isExportAssignment = function () { - return this.currentToken().tokenKind === 47 /* ExportKeyword */ && this.peekToken(1).tokenKind === 107 /* EqualsToken */; + return this.currentToken().tokenKind === 47 /* ExportKeyword */ && this.peekToken(1).tokenKind === 108 /* EqualsToken */; }; ParserImpl.prototype.parseExportAssignment = function () { var exportKeyword = this.eatKeyword(47 /* ExportKeyword */); - var equalsToken = this.eatToken(107 /* EqualsToken */); + var equalsToken = this.eatToken(108 /* EqualsToken */); var identifier = this.eatIdentifierToken(); var semicolonToken = this.eatExplicitOrAutomaticSemicolon(false); @@ -22028,20 +22096,20 @@ var TypeScript; ParserImpl.prototype.isExternalModuleReference = function () { var token0 = this.currentToken(); - if (token0.tokenKind === 66 /* RequireKeyword */) { - return this.peekToken(1).tokenKind === 72 /* OpenParenToken */; + if (token0.tokenKind === 66 /* ModuleKeyword */ || token0.tokenKind === 67 /* RequireKeyword */) { + return this.peekToken(1).tokenKind === 73 /* OpenParenToken */; } return false; }; ParserImpl.prototype.parseExternalModuleReference = function () { - var requireKeyword = this.eatKeyword(66 /* RequireKeyword */); - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var moduleOrRequireKeyword = this.eatAnyToken(); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var stringLiteral = this.eatToken(14 /* StringLiteral */); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); - return this.factory.externalModuleReference(requireKeyword, openParenToken, stringLiteral, closeParenToken); + return this.factory.externalModuleReference(moduleOrRequireKeyword, openParenToken, stringLiteral, closeParenToken); }; ParserImpl.prototype.parseModuleNameModuleReference = function () { @@ -22059,7 +22127,7 @@ var TypeScript; }; ParserImpl.prototype.tryParseTypeArgumentList = function (inExpression) { - if (this.currentToken().kind() !== 80 /* LessThanToken */) { + if (this.currentToken().kind() !== 81 /* LessThanToken */) { return null; } @@ -22069,26 +22137,26 @@ var TypeScript; var typeArguments; if (!inExpression) { - lessThanToken = this.eatToken(80 /* LessThanToken */); + lessThanToken = this.eatToken(81 /* LessThanToken */); result = this.parseSeparatedSyntaxList(262144 /* TypeArgumentList_Types */); typeArguments = result.list; lessThanToken = this.addSkippedTokensAfterToken(lessThanToken, result.skippedTokens); - greaterThanToken = this.eatToken(81 /* GreaterThanToken */); + greaterThanToken = this.eatToken(82 /* GreaterThanToken */); return this.factory.typeArgumentList(lessThanToken, typeArguments, greaterThanToken); } var rewindPoint = this.getRewindPoint(); try { - lessThanToken = this.eatToken(80 /* LessThanToken */); + lessThanToken = this.eatToken(81 /* LessThanToken */); result = this.parseSeparatedSyntaxList(262144 /* TypeArgumentList_Types */); typeArguments = result.list; lessThanToken = this.addSkippedTokensAfterToken(lessThanToken, result.skippedTokens); - greaterThanToken = this.eatToken(81 /* GreaterThanToken */); + greaterThanToken = this.eatToken(82 /* GreaterThanToken */); if (greaterThanToken.fullWidth() === 0 || !this.canFollowTypeArgumentListInExpression(this.currentToken().kind())) { this.rewind(rewindPoint); @@ -22103,25 +22171,25 @@ var TypeScript; ParserImpl.prototype.canFollowTypeArgumentListInExpression = function (kind) { switch (kind) { - case 72 /* OpenParenToken */: - case 76 /* DotToken */: + case 73 /* OpenParenToken */: + case 77 /* DotToken */: - case 73 /* CloseParenToken */: - case 75 /* CloseBracketToken */: - case 106 /* ColonToken */: - case 78 /* SemicolonToken */: - case 79 /* CommaToken */: - case 105 /* QuestionToken */: - case 84 /* EqualsEqualsToken */: - case 87 /* EqualsEqualsEqualsToken */: - case 86 /* ExclamationEqualsToken */: - case 88 /* ExclamationEqualsEqualsToken */: - case 103 /* AmpersandAmpersandToken */: - case 104 /* BarBarToken */: - case 100 /* CaretToken */: - case 98 /* AmpersandToken */: - case 99 /* BarToken */: - case 71 /* CloseBraceToken */: + case 74 /* CloseParenToken */: + case 76 /* CloseBracketToken */: + case 107 /* ColonToken */: + case 79 /* SemicolonToken */: + case 80 /* CommaToken */: + case 106 /* QuestionToken */: + case 85 /* EqualsEqualsToken */: + case 88 /* EqualsEqualsEqualsToken */: + case 87 /* ExclamationEqualsToken */: + case 89 /* ExclamationEqualsEqualsToken */: + case 104 /* AmpersandAmpersandToken */: + case 105 /* BarBarToken */: + case 101 /* CaretToken */: + case 99 /* AmpersandToken */: + case 100 /* BarToken */: + case 72 /* CloseBraceToken */: case 10 /* EndOfFileToken */: return true; @@ -22134,8 +22202,8 @@ var TypeScript; var shouldContinue = this.isIdentifier(this.currentToken()); var current = this.eatIdentifierToken(); - while (shouldContinue && this.currentToken().tokenKind === 76 /* DotToken */) { - var dotToken = this.eatToken(76 /* DotToken */); + while (shouldContinue && this.currentToken().tokenKind === 77 /* DotToken */) { + var dotToken = this.eatToken(77 /* DotToken */); var currentToken = this.currentToken(); var identifierName; @@ -22169,7 +22237,7 @@ var TypeScript; var enumKeyword = this.eatKeyword(46 /* EnumKeyword */); var identifier = this.eatIdentifierToken(); - var openBraceToken = this.eatToken(70 /* OpenBraceToken */); + var openBraceToken = this.eatToken(71 /* OpenBraceToken */); var enumElements = TypeScript.Syntax.emptySeparatedList; if (openBraceToken.width() > 0) { @@ -22178,13 +22246,13 @@ var TypeScript; openBraceToken = this.addSkippedTokensAfterToken(openBraceToken, result.skippedTokens); } - var closeBraceToken = this.eatToken(71 /* CloseBraceToken */); + var closeBraceToken = this.eatToken(72 /* CloseBraceToken */); return this.factory.enumDeclaration(modifiers, enumKeyword, identifier, openBraceToken, enumElements, closeBraceToken); }; ParserImpl.prototype.isEnumElement = function (inErrorRecovery) { - if (this.currentNode() !== null && this.currentNode().kind() === 243 /* EnumElement */) { + if (this.currentNode() !== null && this.currentNode().kind() === 244 /* EnumElement */) { return true; } @@ -22192,7 +22260,7 @@ var TypeScript; }; ParserImpl.prototype.parseEnumElement = function () { - if (this.currentNode() !== null && this.currentNode().kind() === 243 /* EnumElement */) { + if (this.currentNode() !== null && this.currentNode().kind() === 244 /* EnumElement */) { return this.eatNode(); } @@ -22211,7 +22279,7 @@ var TypeScript; case 55 /* PrivateKeyword */: case 58 /* StaticKeyword */: case 47 /* ExportKeyword */: - case 63 /* DeclareKeyword */: + case 64 /* DeclareKeyword */: return true; default: @@ -22281,7 +22349,7 @@ var TypeScript; var identifier = this.eatIdentifierToken(); var typeParameterList = this.parseOptionalTypeParameterList(false); var heritageClauses = this.parseHeritageClauses(); - var openBraceToken = this.eatToken(70 /* OpenBraceToken */); + var openBraceToken = this.eatToken(71 /* OpenBraceToken */); var classElements = TypeScript.Syntax.emptyList; if (openBraceToken.width() > 0) { @@ -22291,12 +22359,12 @@ var TypeScript; openBraceToken = this.addSkippedTokensAfterToken(openBraceToken, result.skippedTokens); } - var closeBraceToken = this.eatToken(71 /* CloseBraceToken */); + var closeBraceToken = this.eatToken(72 /* CloseBraceToken */); return this.factory.classDeclaration(modifiers, classKeyword, identifier, typeParameterList, heritageClauses, openBraceToken, classElements, closeBraceToken); }; ParserImpl.prototype.isConstructorDeclaration = function () { - return this.currentToken().tokenKind === 62 /* ConstructorKeyword */; + return this.currentToken().tokenKind === 63 /* ConstructorKeyword */; }; ParserImpl.isPublicOrPrivateKeyword = function (token) { @@ -22306,7 +22374,7 @@ var TypeScript; ParserImpl.prototype.isMemberAccessorDeclaration = function (inErrorRecovery) { var index = this.modifierCount(); - if (this.peekToken(index).tokenKind !== 64 /* GetKeyword */ && this.peekToken(index).tokenKind !== 68 /* SetKeyword */) { + if (this.peekToken(index).tokenKind !== 65 /* GetKeyword */ && this.peekToken(index).tokenKind !== 69 /* SetKeyword */) { return false; } @@ -22317,9 +22385,9 @@ var TypeScript; ParserImpl.prototype.parseMemberAccessorDeclaration = function () { var modifiers = this.parseModifiers(); - if (this.currentToken().tokenKind === 64 /* GetKeyword */) { + if (this.currentToken().tokenKind === 65 /* GetKeyword */) { return this.parseGetMemberAccessorDeclaration(modifiers); - } else if (this.currentToken().tokenKind === 68 /* SetKeyword */) { + } else if (this.currentToken().tokenKind === 69 /* SetKeyword */) { return this.parseSetMemberAccessorDeclaration(modifiers); } else { throw TypeScript.Errors.invalidOperation(); @@ -22327,7 +22395,7 @@ var TypeScript; }; ParserImpl.prototype.parseGetMemberAccessorDeclaration = function (modifiers) { - var getKeyword = this.eatKeyword(64 /* GetKeyword */); + var getKeyword = this.eatKeyword(65 /* GetKeyword */); var propertyName = this.eatPropertyName(); var parameterList = this.parseParameterList(); var typeAnnotation = this.parseOptionalTypeAnnotation(false); @@ -22337,7 +22405,7 @@ var TypeScript; }; ParserImpl.prototype.parseSetMemberAccessorDeclaration = function (modifiers) { - var setKeyword = this.eatKeyword(68 /* SetKeyword */); + var setKeyword = this.eatKeyword(69 /* SetKeyword */); var propertyName = this.eatPropertyName(); var parameterList = this.parseParameterList(); var block = this.parseBlock(false, false); @@ -22354,7 +22422,7 @@ var TypeScript; }; ParserImpl.prototype.parseConstructorDeclaration = function () { - var constructorKeyword = this.eatKeyword(62 /* ConstructorKeyword */); + var constructorKeyword = this.eatKeyword(63 /* ConstructorKeyword */); var parameterList = this.parseParameterList(); var semicolonToken = null; @@ -22425,10 +22493,10 @@ var TypeScript; ParserImpl.prototype.isDefinitelyMemberVariablePropertyName = function (index) { if (TypeScript.SyntaxFacts.isAnyKeyword(this.peekToken(index).tokenKind)) { switch (this.peekToken(index + 1).tokenKind) { - case 78 /* SemicolonToken */: - case 107 /* EqualsToken */: - case 106 /* ColonToken */: - case 71 /* CloseBraceToken */: + case 79 /* SemicolonToken */: + case 108 /* EqualsToken */: + case 107 /* ColonToken */: + case 72 /* CloseBraceToken */: case 10 /* EndOfFileToken */: return true; default: @@ -22502,9 +22570,9 @@ var TypeScript; ParserImpl.prototype.tryAddUnexpectedEqualsGreaterThanToken = function (callSignature) { var token0 = this.currentToken(); - var hasEqualsGreaterThanToken = token0.tokenKind === 85 /* EqualsGreaterThanToken */; + var hasEqualsGreaterThanToken = token0.tokenKind === 86 /* EqualsGreaterThanToken */; if (hasEqualsGreaterThanToken) { - var diagnostic = new TypeScript.Diagnostic(this.fileName, this.currentTokenStart(), token0.width(), TypeScript.DiagnosticCode.Unexpected_token_0_expected, [TypeScript.SyntaxFacts.getText(70 /* OpenBraceToken */)]); + var diagnostic = new TypeScript.Diagnostic(this.fileName, this.currentTokenStart(), token0.width(), TypeScript.DiagnosticCode.Unexpected_token_0_expected, [TypeScript.SyntaxFacts.getText(71 /* OpenBraceToken */)]); this.addDiagnostic(diagnostic); var token = this.eatAnyToken(); @@ -22544,11 +22612,11 @@ var TypeScript; ParserImpl.prototype.isModuleDeclaration = function () { var index = this.modifierCount(); - if (index > 0 && this.peekToken(index).tokenKind === 65 /* ModuleKeyword */) { + if (index > 0 && this.peekToken(index).tokenKind === 66 /* ModuleKeyword */) { return true; } - if (this.currentToken().tokenKind === 65 /* ModuleKeyword */) { + if (this.currentToken().tokenKind === 66 /* ModuleKeyword */) { var token1 = this.peekToken(1); return this.isIdentifier(token1) || token1.tokenKind === 14 /* StringLiteral */; } @@ -22558,7 +22626,7 @@ var TypeScript; ParserImpl.prototype.parseModuleDeclaration = function () { var modifiers = this.parseModifiers(); - var moduleKeyword = this.eatKeyword(65 /* ModuleKeyword */); + var moduleKeyword = this.eatKeyword(66 /* ModuleKeyword */); var moduleName = null; var stringLiteral = null; @@ -22569,7 +22637,7 @@ var TypeScript; moduleName = this.parseName(); } - var openBraceToken = this.eatToken(70 /* OpenBraceToken */); + var openBraceToken = this.eatToken(71 /* OpenBraceToken */); var moduleElements = TypeScript.Syntax.emptyList; if (openBraceToken.width() > 0) { @@ -22578,7 +22646,7 @@ var TypeScript; openBraceToken = this.addSkippedTokensAfterToken(openBraceToken, result.skippedTokens); } - var closeBraceToken = this.eatToken(71 /* CloseBraceToken */); + var closeBraceToken = this.eatToken(72 /* CloseBraceToken */); return this.factory.moduleDeclaration(modifiers, moduleKeyword, moduleName, stringLiteral, openBraceToken, moduleElements, closeBraceToken); }; @@ -22605,7 +22673,7 @@ var TypeScript; }; ParserImpl.prototype.parseObjectType = function () { - var openBraceToken = this.eatToken(70 /* OpenBraceToken */); + var openBraceToken = this.eatToken(71 /* OpenBraceToken */); var typeMembers = TypeScript.Syntax.emptySeparatedList; if (openBraceToken.width() > 0) { @@ -22614,7 +22682,7 @@ var TypeScript; openBraceToken = this.addSkippedTokensAfterToken(openBraceToken, result.skippedTokens); } - var closeBraceToken = this.eatToken(71 /* CloseBraceToken */); + var closeBraceToken = this.eatToken(72 /* CloseBraceToken */); return this.factory.objectType(openBraceToken, typeMembers, closeBraceToken); }; @@ -22654,9 +22722,9 @@ var TypeScript; }; ParserImpl.prototype.parseIndexSignature = function () { - var openBracketToken = this.eatToken(74 /* OpenBracketToken */); + var openBracketToken = this.eatToken(75 /* OpenBracketToken */); var parameter = this.parseParameter(); - var closeBracketToken = this.eatToken(75 /* CloseBracketToken */); + var closeBracketToken = this.eatToken(76 /* CloseBracketToken */); var typeAnnotation = this.parseOptionalTypeAnnotation(false); return this.factory.indexSignature(openBracketToken, parameter, closeBracketToken, typeAnnotation); @@ -22664,7 +22732,7 @@ var TypeScript; ParserImpl.prototype.parseMethodSignature = function () { var propertyName = this.eatPropertyName(); - var questionToken = this.tryEatToken(105 /* QuestionToken */); + var questionToken = this.tryEatToken(106 /* QuestionToken */); var callSignature = this.parseCallSignature(false); return this.factory.methodSignature(propertyName, questionToken, callSignature); @@ -22672,7 +22740,7 @@ var TypeScript; ParserImpl.prototype.parsePropertySignature = function () { var propertyName = this.eatPropertyName(); - var questionToken = this.tryEatToken(105 /* QuestionToken */); + var questionToken = this.tryEatToken(106 /* QuestionToken */); var typeAnnotation = this.parseOptionalTypeAnnotation(false); return this.factory.propertySignature(propertyName, questionToken, typeAnnotation); @@ -22680,7 +22748,7 @@ var TypeScript; ParserImpl.prototype.isCallSignature = function (tokenIndex) { var tokenKind = this.peekToken(tokenIndex).tokenKind; - return tokenKind === 72 /* OpenParenToken */ || tokenKind === 80 /* LessThanToken */; + return tokenKind === 73 /* OpenParenToken */ || tokenKind === 81 /* LessThanToken */; }; ParserImpl.prototype.isConstructSignature = function () { @@ -22689,11 +22757,11 @@ var TypeScript; } var token1 = this.peekToken(1); - return token1.tokenKind === 80 /* LessThanToken */ || token1.tokenKind === 72 /* OpenParenToken */; + return token1.tokenKind === 81 /* LessThanToken */ || token1.tokenKind === 73 /* OpenParenToken */; }; ParserImpl.prototype.isIndexSignature = function () { - return this.currentToken().tokenKind === 74 /* OpenBracketToken */; + return this.currentToken().tokenKind === 75 /* OpenBracketToken */; }; ParserImpl.prototype.isMethodSignature = function (inErrorRecovery) { @@ -22702,7 +22770,7 @@ var TypeScript; return true; } - if (this.peekToken(1).tokenKind === 105 /* QuestionToken */ && this.isCallSignature(2)) { + if (this.peekToken(1).tokenKind === 106 /* QuestionToken */ && this.isCallSignature(2)) { return true; } } @@ -22833,9 +22901,9 @@ var TypeScript; var doKeyword = this.eatKeyword(22 /* DoKeyword */); var statement = this.parseStatement(); var whileKeyword = this.eatKeyword(42 /* WhileKeyword */); - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var condition = this.parseExpression(true); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); var semicolonToken = this.eatExplicitOrAutomaticSemicolon(true); @@ -22843,12 +22911,12 @@ var TypeScript; }; ParserImpl.prototype.isLabeledStatement = function () { - return this.isIdentifier(this.currentToken()) && this.peekToken(1).tokenKind === 106 /* ColonToken */; + return this.isIdentifier(this.currentToken()) && this.peekToken(1).tokenKind === 107 /* ColonToken */; }; ParserImpl.prototype.parseLabeledStatement = function () { var identifier = this.eatIdentifierToken(); - var colonToken = this.eatToken(106 /* ColonToken */); + var colonToken = this.eatToken(107 /* ColonToken */); var statement = this.parseStatement(); return this.factory.labeledStatement(identifier, colonToken, statement); @@ -22885,10 +22953,10 @@ var TypeScript; ParserImpl.prototype.parseCatchClause = function () { var catchKeyword = this.eatKeyword(17 /* CatchKeyword */); - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var identifier = this.eatIdentifierToken(); var typeAnnotation = this.parseOptionalTypeAnnotation(false); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); var savedListParsingState = this.listParsingState; this.listParsingState |= 128 /* CatchBlock_Statements */; @@ -22915,9 +22983,9 @@ var TypeScript; ParserImpl.prototype.parseWithStatement = function () { var withKeyword = this.eatKeyword(43 /* WithKeyword */); - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var condition = this.parseExpression(true); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); var statement = this.parseStatement(); return this.factory.withStatement(withKeyword, openParenToken, condition, closeParenToken, statement); @@ -22929,9 +22997,9 @@ var TypeScript; ParserImpl.prototype.parseWhileStatement = function () { var whileKeyword = this.eatKeyword(42 /* WhileKeyword */); - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var condition = this.parseExpression(true); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); var statement = this.parseStatement(); return this.factory.whileStatement(whileKeyword, openParenToken, condition, closeParenToken, statement); @@ -22942,11 +23010,11 @@ var TypeScript; return false; } - return this.currentToken().tokenKind === 78 /* SemicolonToken */; + return this.currentToken().tokenKind === 79 /* SemicolonToken */; }; ParserImpl.prototype.parseEmptyStatement = function () { - var semicolonToken = this.eatToken(78 /* SemicolonToken */); + var semicolonToken = this.eatToken(79 /* SemicolonToken */); return this.factory.emptyStatement(semicolonToken); }; @@ -22956,12 +23024,12 @@ var TypeScript; ParserImpl.prototype.parseForOrForInStatement = function () { var forKeyword = this.eatKeyword(26 /* ForKeyword */); - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var currentToken = this.currentToken(); if (currentToken.tokenKind === 40 /* VarKeyword */) { return this.parseForOrForInStatementWithVariableDeclaration(forKeyword, openParenToken); - } else if (currentToken.tokenKind === 78 /* SemicolonToken */) { + } else if (currentToken.tokenKind === 79 /* SemicolonToken */) { return this.parseForStatement(forKeyword, openParenToken); } else { return this.parseForOrForInStatementWithInitializer(forKeyword, openParenToken); @@ -22981,7 +23049,7 @@ var TypeScript; ParserImpl.prototype.parseForInStatementWithVariableDeclarationOrInitializer = function (forKeyword, openParenToken, variableDeclaration, initializer) { var inKeyword = this.eatKeyword(29 /* InKeyword */); var expression = this.parseExpression(true); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); var statement = this.parseStatement(); return this.factory.forInStatement(forKeyword, openParenToken, variableDeclaration, initializer, inKeyword, expression, closeParenToken, statement); @@ -22999,7 +23067,7 @@ var TypeScript; ParserImpl.prototype.parseForStatement = function (forKeyword, openParenToken) { var initializer = null; - if (this.currentToken().tokenKind !== 78 /* SemicolonToken */ && this.currentToken().tokenKind !== 73 /* CloseParenToken */ && this.currentToken().tokenKind !== 10 /* EndOfFileToken */) { + if (this.currentToken().tokenKind !== 79 /* SemicolonToken */ && this.currentToken().tokenKind !== 74 /* CloseParenToken */ && this.currentToken().tokenKind !== 10 /* EndOfFileToken */) { initializer = this.parseExpression(false); } @@ -23007,21 +23075,21 @@ var TypeScript; }; ParserImpl.prototype.parseForStatementWithVariableDeclarationOrInitializer = function (forKeyword, openParenToken, variableDeclaration, initializer) { - var firstSemicolonToken = this.eatToken(78 /* SemicolonToken */); + var firstSemicolonToken = this.eatToken(79 /* SemicolonToken */); var condition = null; - if (this.currentToken().tokenKind !== 78 /* SemicolonToken */ && this.currentToken().tokenKind !== 73 /* CloseParenToken */ && this.currentToken().tokenKind !== 10 /* EndOfFileToken */) { + if (this.currentToken().tokenKind !== 79 /* SemicolonToken */ && this.currentToken().tokenKind !== 74 /* CloseParenToken */ && this.currentToken().tokenKind !== 10 /* EndOfFileToken */) { condition = this.parseExpression(true); } - var secondSemicolonToken = this.eatToken(78 /* SemicolonToken */); + var secondSemicolonToken = this.eatToken(79 /* SemicolonToken */); var incrementor = null; - if (this.currentToken().tokenKind !== 73 /* CloseParenToken */ && this.currentToken().tokenKind !== 10 /* EndOfFileToken */) { + if (this.currentToken().tokenKind !== 74 /* CloseParenToken */ && this.currentToken().tokenKind !== 10 /* EndOfFileToken */) { incrementor = this.parseExpression(true); } - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); var statement = this.parseStatement(); return this.factory.forStatement(forKeyword, openParenToken, variableDeclaration, initializer, firstSemicolonToken, condition, secondSemicolonToken, incrementor, closeParenToken, statement); @@ -23069,11 +23137,11 @@ var TypeScript; ParserImpl.prototype.parseSwitchStatement = function () { var switchKeyword = this.eatKeyword(34 /* SwitchKeyword */); - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var expression = this.parseExpression(true); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); - var openBraceToken = this.eatToken(70 /* OpenBraceToken */); + var openBraceToken = this.eatToken(71 /* OpenBraceToken */); var switchClauses = TypeScript.Syntax.emptyList; if (openBraceToken.width() > 0) { @@ -23082,7 +23150,7 @@ var TypeScript; openBraceToken = this.addSkippedTokensAfterToken(openBraceToken, result.skippedTokens); } - var closeBraceToken = this.eatToken(71 /* CloseBraceToken */); + var closeBraceToken = this.eatToken(72 /* CloseBraceToken */); return this.factory.switchStatement(switchKeyword, openParenToken, expression, closeParenToken, openBraceToken, switchClauses, closeBraceToken); }; @@ -23119,7 +23187,7 @@ var TypeScript; ParserImpl.prototype.parseCaseSwitchClause = function () { var caseKeyword = this.eatKeyword(16 /* CaseKeyword */); var expression = this.parseExpression(true); - var colonToken = this.eatToken(106 /* ColonToken */); + var colonToken = this.eatToken(107 /* ColonToken */); var statements = TypeScript.Syntax.emptyList; if (colonToken.fullWidth() > 0) { @@ -23133,7 +23201,7 @@ var TypeScript; ParserImpl.prototype.parseDefaultSwitchClause = function () { var defaultKeyword = this.eatKeyword(20 /* DefaultKeyword */); - var colonToken = this.eatToken(106 /* ColonToken */); + var colonToken = this.eatToken(107 /* ColonToken */); var statements = TypeScript.Syntax.emptyList; if (colonToken.fullWidth() > 0) { @@ -23186,7 +23254,7 @@ var TypeScript; var currentToken = this.currentToken(); var kind = currentToken.tokenKind; - if (kind === 70 /* OpenBraceToken */ || kind === 27 /* FunctionKeyword */) { + if (kind === 71 /* OpenBraceToken */ || kind === 27 /* FunctionKeyword */) { return false; } @@ -23194,7 +23262,7 @@ var TypeScript; }; ParserImpl.prototype.isAssignmentOrOmittedExpression = function () { - if (this.currentToken().tokenKind === 79 /* CommaToken */) { + if (this.currentToken().tokenKind === 80 /* CommaToken */) { return true; } @@ -23202,7 +23270,7 @@ var TypeScript; }; ParserImpl.prototype.parseAssignmentOrOmittedExpression = function () { - if (this.currentToken().tokenKind === 79 /* CommaToken */) { + if (this.currentToken().tokenKind === 80 /* CommaToken */) { return this.factory.omittedExpression(); } @@ -23219,29 +23287,29 @@ var TypeScript; case 12 /* RegularExpressionLiteral */: return true; - case 74 /* OpenBracketToken */: - case 72 /* OpenParenToken */: + case 75 /* OpenBracketToken */: + case 73 /* OpenParenToken */: return true; - case 80 /* LessThanToken */: + case 81 /* LessThanToken */: return true; - case 93 /* PlusPlusToken */: - case 94 /* MinusMinusToken */: - case 89 /* PlusToken */: - case 90 /* MinusToken */: - case 102 /* TildeToken */: - case 101 /* ExclamationToken */: + case 94 /* PlusPlusToken */: + case 95 /* MinusMinusToken */: + case 90 /* PlusToken */: + case 91 /* MinusToken */: + case 103 /* TildeToken */: + case 102 /* ExclamationToken */: return true; - case 70 /* OpenBraceToken */: + case 71 /* OpenBraceToken */: return true; - case 85 /* EqualsGreaterThanToken */: + case 86 /* EqualsGreaterThanToken */: return true; - case 118 /* SlashToken */: - case 119 /* SlashEqualsToken */: + case 119 /* SlashToken */: + case 120 /* SlashEqualsToken */: return true; case 50 /* SuperKeyword */: @@ -23284,9 +23352,9 @@ var TypeScript; ParserImpl.prototype.parseIfStatement = function () { var ifKeyword = this.eatKeyword(28 /* IfKeyword */); - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var condition = this.parseExpression(true); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); var statement = this.parseStatement(); var elseClause = null; @@ -23334,7 +23402,7 @@ var TypeScript; }; ParserImpl.prototype.isVariableDeclarator = function () { - if (this.currentNode() !== null && this.currentNode().kind() === 224 /* VariableDeclarator */) { + if (this.currentNode() !== null && this.currentNode().kind() === 225 /* VariableDeclarator */) { return true; } @@ -23342,7 +23410,7 @@ var TypeScript; }; ParserImpl.prototype.canReuseVariableDeclaratorNode = function (node) { - if (node === null || node.kind() !== 224 /* VariableDeclarator */) { + if (node === null || node.kind() !== 225 /* VariableDeclarator */) { return false; } @@ -23371,21 +23439,21 @@ var TypeScript; }; ParserImpl.prototype.isColonValueClause = function () { - return this.currentToken().tokenKind === 106 /* ColonToken */; + return this.currentToken().tokenKind === 107 /* ColonToken */; }; ParserImpl.prototype.isEqualsValueClause = function (inParameter) { var token0 = this.currentToken(); - if (token0.tokenKind === 107 /* EqualsToken */) { + if (token0.tokenKind === 108 /* EqualsToken */) { return true; } if (!this.previousToken().hasTrailingNewLine()) { - if (token0.tokenKind === 85 /* EqualsGreaterThanToken */) { + if (token0.tokenKind === 86 /* EqualsGreaterThanToken */) { return false; } - if (token0.tokenKind === 70 /* OpenBraceToken */ && inParameter) { + if (token0.tokenKind === 71 /* OpenBraceToken */ && inParameter) { return false; } @@ -23396,7 +23464,7 @@ var TypeScript; }; ParserImpl.prototype.parseEqualsValueClause = function (allowIn) { - var equalsToken = this.eatToken(107 /* EqualsToken */); + var equalsToken = this.eatToken(108 /* EqualsToken */); var value = this.parseAssignmentExpression(allowIn); return this.factory.equalsValueClause(equalsToken, value); @@ -23466,11 +23534,11 @@ var TypeScript; continue; } - if (token0Kind === 105 /* QuestionToken */ && precedence <= 3 /* ConditionalExpressionPrecedence */) { - var questionToken = this.eatToken(105 /* QuestionToken */); + if (token0Kind === 106 /* QuestionToken */ && precedence <= 3 /* ConditionalExpressionPrecedence */) { + var questionToken = this.eatToken(106 /* QuestionToken */); var whenTrueExpression = this.parseAssignmentExpression(allowIn); - var colon = this.eatToken(106 /* ColonToken */); + var colon = this.eatToken(107 /* ColonToken */); var whenFalseExpression = this.parseAssignmentExpression(allowIn); leftOperand = this.factory.conditionalExpression(leftOperand, questionToken, whenTrueExpression, colon, whenFalseExpression); @@ -23486,7 +23554,7 @@ var TypeScript; ParserImpl.prototype.tryMergeBinaryExpressionTokens = function () { var token0 = this.currentToken(); - if (token0.tokenKind === 81 /* GreaterThanToken */ && !token0.hasTrailingTrivia()) { + if (token0.tokenKind === 82 /* GreaterThanToken */ && !token0.hasTrailingTrivia()) { var storage = this.mergeTokensStorage; storage[0] = 0 /* None */; storage[1] = 0 /* None */; @@ -23504,20 +23572,20 @@ var TypeScript; } } - if (storage[0] === 81 /* GreaterThanToken */) { - if (storage[1] === 81 /* GreaterThanToken */) { - if (storage[2] === 107 /* EqualsToken */) { - return { tokenCount: 4, syntaxKind: 114 /* GreaterThanGreaterThanGreaterThanEqualsToken */ }; + if (storage[0] === 82 /* GreaterThanToken */) { + if (storage[1] === 82 /* GreaterThanToken */) { + if (storage[2] === 108 /* EqualsToken */) { + return { tokenCount: 4, syntaxKind: 115 /* GreaterThanGreaterThanGreaterThanEqualsToken */ }; } else { - return { tokenCount: 3, syntaxKind: 97 /* GreaterThanGreaterThanGreaterThanToken */ }; + return { tokenCount: 3, syntaxKind: 98 /* GreaterThanGreaterThanGreaterThanToken */ }; } - } else if (storage[1] === 107 /* EqualsToken */) { - return { tokenCount: 3, syntaxKind: 113 /* GreaterThanGreaterThanEqualsToken */ }; + } else if (storage[1] === 108 /* EqualsToken */) { + return { tokenCount: 3, syntaxKind: 114 /* GreaterThanGreaterThanEqualsToken */ }; } else { - return { tokenCount: 2, syntaxKind: 96 /* GreaterThanGreaterThanToken */ }; + return { tokenCount: 2, syntaxKind: 97 /* GreaterThanGreaterThanToken */ }; } - } else if (storage[0] === 107 /* EqualsToken */) { - return { tokenCount: 2, syntaxKind: 83 /* GreaterThanEqualsToken */ }; + } else if (storage[0] === 108 /* EqualsToken */) { + return { tokenCount: 2, syntaxKind: 84 /* GreaterThanEqualsToken */ }; } } @@ -23526,18 +23594,18 @@ var TypeScript; ParserImpl.prototype.isRightAssociative = function (expressionKind) { switch (expressionKind) { - case 173 /* AssignmentExpression */: - case 174 /* AddAssignmentExpression */: - case 175 /* SubtractAssignmentExpression */: - case 176 /* MultiplyAssignmentExpression */: - case 177 /* DivideAssignmentExpression */: - case 178 /* ModuloAssignmentExpression */: - case 179 /* AndAssignmentExpression */: - case 180 /* ExclusiveOrAssignmentExpression */: - case 181 /* OrAssignmentExpression */: - case 182 /* LeftShiftAssignmentExpression */: - case 183 /* SignedRightShiftAssignmentExpression */: - case 184 /* UnsignedRightShiftAssignmentExpression */: + case 174 /* AssignmentExpression */: + case 175 /* AddAssignmentExpression */: + case 176 /* SubtractAssignmentExpression */: + case 177 /* MultiplyAssignmentExpression */: + case 178 /* DivideAssignmentExpression */: + case 179 /* ModuloAssignmentExpression */: + case 180 /* AndAssignmentExpression */: + case 181 /* ExclusiveOrAssignmentExpression */: + case 182 /* OrAssignmentExpression */: + case 183 /* LeftShiftAssignmentExpression */: + case 184 /* SignedRightShiftAssignmentExpression */: + case 185 /* UnsignedRightShiftAssignmentExpression */: return true; default: return false; @@ -23557,7 +23625,7 @@ var TypeScript; while (true) { var currentTokenKind = this.currentToken().tokenKind; switch (currentTokenKind) { - case 72 /* OpenParenToken */: + case 73 /* OpenParenToken */: if (inObjectCreation) { return expression; } @@ -23565,7 +23633,7 @@ var TypeScript; expression = this.factory.invocationExpression(expression, this.parseArgumentList(null)); continue; - case 80 /* LessThanToken */: + case 81 /* LessThanToken */: if (inObjectCreation) { return expression; } @@ -23578,12 +23646,12 @@ var TypeScript; break; - case 74 /* OpenBracketToken */: + case 75 /* OpenBracketToken */: expression = this.parseElementAccessExpression(expression, inObjectCreation); continue; - case 93 /* PlusPlusToken */: - case 94 /* MinusMinusToken */: + case 94 /* PlusPlusToken */: + case 95 /* MinusMinusToken */: if (this.previousToken() !== null && this.previousToken().hasTrailingNewLine()) { break; } @@ -23591,8 +23659,8 @@ var TypeScript; expression = this.factory.postfixUnaryExpression(TypeScript.SyntaxFacts.getPostfixUnaryExpressionFromOperatorToken(currentTokenKind), expression, this.eatAnyToken()); continue; - case 76 /* DotToken */: - expression = this.factory.memberAccessExpression(expression, this.eatToken(76 /* DotToken */), this.eatIdentifierNameToken()); + case 77 /* DotToken */: + expression = this.factory.memberAccessExpression(expression, this.eatToken(77 /* DotToken */), this.eatIdentifierNameToken()); continue; } @@ -23603,14 +23671,14 @@ var TypeScript; ParserImpl.prototype.tryParseArgumentList = function () { var typeArgumentList = null; - if (this.currentToken().tokenKind === 80 /* LessThanToken */) { + if (this.currentToken().tokenKind === 81 /* LessThanToken */) { var rewindPoint = this.getRewindPoint(); try { typeArgumentList = this.tryParseTypeArgumentList(true); var token0 = this.currentToken(); - var isOpenParen = token0.tokenKind === 72 /* OpenParenToken */; - var isDot = token0.tokenKind === 76 /* DotToken */; + var isOpenParen = token0.tokenKind === 73 /* OpenParenToken */; + var isDot = token0.tokenKind === 77 /* DotToken */; var isOpenParenOrDot = isOpenParen || isDot; if (typeArgumentList === null || !isOpenParenOrDot) { this.rewind(rewindPoint); @@ -23621,14 +23689,14 @@ var TypeScript; var diagnostic = new TypeScript.Diagnostic(this.fileName, this.currentTokenStart(), token0.width(), TypeScript.DiagnosticCode.A_parameter_list_must_follow_a_generic_type_argument_list_expected, null); this.addDiagnostic(diagnostic); - return this.factory.argumentList(typeArgumentList, TypeScript.Syntax.emptyToken(72 /* OpenParenToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.emptyToken(73 /* CloseParenToken */)); + return this.factory.argumentList(typeArgumentList, TypeScript.Syntax.emptyToken(73 /* OpenParenToken */), TypeScript.Syntax.emptySeparatedList, TypeScript.Syntax.emptyToken(74 /* CloseParenToken */)); } } finally { this.releaseRewindPoint(rewindPoint); } } - if (this.currentToken().tokenKind === 72 /* OpenParenToken */) { + if (this.currentToken().tokenKind === 73 /* OpenParenToken */) { return this.parseArgumentList(typeArgumentList); } @@ -23636,7 +23704,7 @@ var TypeScript; }; ParserImpl.prototype.parseArgumentList = function (typeArgumentList) { - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var arguments = TypeScript.Syntax.emptySeparatedList; if (openParenToken.fullWidth() > 0) { @@ -23645,17 +23713,17 @@ var TypeScript; openParenToken = this.addSkippedTokensAfterToken(openParenToken, result.skippedTokens); } - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); return this.factory.argumentList(typeArgumentList, openParenToken, arguments, closeParenToken); }; ParserImpl.prototype.parseElementAccessExpression = function (expression, inObjectCreation) { var start = this.currentTokenStart(); - var openBracketToken = this.eatToken(74 /* OpenBracketToken */); + var openBracketToken = this.eatToken(75 /* OpenBracketToken */); var argumentExpression; - if (this.currentToken().tokenKind === 75 /* CloseBracketToken */ && inObjectCreation) { + if (this.currentToken().tokenKind === 76 /* CloseBracketToken */ && inObjectCreation) { var end = this.currentTokenStart() + this.currentToken().width(); var diagnostic = new TypeScript.Diagnostic(this.fileName, start, end - start, TypeScript.DiagnosticCode.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead, null); this.addDiagnostic(diagnostic); @@ -23665,7 +23733,7 @@ var TypeScript; argumentExpression = this.parseExpression(true); } - var closeBracketToken = this.eatToken(75 /* CloseBracketToken */); + var closeBracketToken = this.eatToken(76 /* CloseBracketToken */); return this.factory.elementAccessExpression(expression, openBracketToken, argumentExpression, closeBracketToken); }; @@ -23673,7 +23741,7 @@ var TypeScript; ParserImpl.prototype.parseTermWorker = function () { var currentToken = this.currentToken(); - if (currentToken.tokenKind === 85 /* EqualsGreaterThanToken */) { + if (currentToken.tokenKind === 86 /* EqualsGreaterThanToken */) { return this.parseSimpleArrowFunctionExpression(); } @@ -23725,20 +23793,20 @@ var TypeScript; case 14 /* StringLiteral */: return this.parseLiteralExpression(); - case 74 /* OpenBracketToken */: + case 75 /* OpenBracketToken */: return this.parseArrayLiteralExpression(); - case 70 /* OpenBraceToken */: + case 71 /* OpenBraceToken */: return this.parseObjectLiteralExpression(); - case 72 /* OpenParenToken */: + case 73 /* OpenParenToken */: return this.parseParenthesizedOrArrowFunctionExpression(); - case 80 /* LessThanToken */: + case 81 /* LessThanToken */: return this.parseCastOrArrowFunctionExpression(); - case 118 /* SlashToken */: - case 119 /* SlashEqualsToken */: + case 119 /* SlashToken */: + case 120 /* SlashEqualsToken */: var result = this.tryReparseDivideAsRegularExpression(); if (result !== null) { return result; @@ -23766,17 +23834,17 @@ var TypeScript; case 14 /* StringLiteral */: case 13 /* NumericLiteral */: case 12 /* RegularExpressionLiteral */: - case 93 /* PlusPlusToken */: - case 94 /* MinusMinusToken */: - case 75 /* CloseBracketToken */: - case 71 /* CloseBraceToken */: + case 94 /* PlusPlusToken */: + case 95 /* MinusMinusToken */: + case 76 /* CloseBracketToken */: + case 72 /* CloseBraceToken */: return null; } } currentToken = this.currentTokenAllowingRegularExpression(); - if (currentToken.tokenKind === 118 /* SlashToken */ || currentToken.tokenKind === 119 /* SlashEqualsToken */) { + if (currentToken.tokenKind === 119 /* SlashToken */ || currentToken.tokenKind === 120 /* SlashEqualsToken */) { return null; } else if (currentToken.tokenKind === 12 /* RegularExpressionLiteral */) { return this.parseLiteralExpression(); @@ -23850,9 +23918,9 @@ var TypeScript; }; ParserImpl.prototype.parseCastExpression = function () { - var lessThanToken = this.eatToken(80 /* LessThanToken */); + var lessThanToken = this.eatToken(81 /* LessThanToken */); var type = this.parseType(); - var greaterThanToken = this.eatToken(81 /* GreaterThanToken */); + var greaterThanToken = this.eatToken(82 /* GreaterThanToken */); var expression = this.parseUnaryExpression(); return this.factory.castExpression(lessThanToken, type, greaterThanToken, expression); @@ -23864,9 +23932,9 @@ var TypeScript; return result; } - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var expression = this.parseExpression(true); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); return this.factory.parenthesizedExpression(openParenToken, expression, closeParenToken); }; @@ -23899,11 +23967,11 @@ var TypeScript; var callSignature = this.parseCallSignature(true); - if (requireArrow && this.currentToken().tokenKind !== 85 /* EqualsGreaterThanToken */) { + if (requireArrow && this.currentToken().tokenKind !== 86 /* EqualsGreaterThanToken */) { return null; } - var equalsGreaterThanToken = this.eatToken(85 /* EqualsGreaterThanToken */); + var equalsGreaterThanToken = this.eatToken(86 /* EqualsGreaterThanToken */); var body = this.parseArrowFunctionBody(); return this.factory.parenthesizedArrowFunctionExpression(callSignature, equalsGreaterThanToken, body); @@ -23918,40 +23986,40 @@ var TypeScript; }; ParserImpl.prototype.isSimpleArrowFunctionExpression = function () { - if (this.currentToken().tokenKind === 85 /* EqualsGreaterThanToken */) { + if (this.currentToken().tokenKind === 86 /* EqualsGreaterThanToken */) { return true; } - return this.isIdentifier(this.currentToken()) && this.peekToken(1).tokenKind === 85 /* EqualsGreaterThanToken */; + return this.isIdentifier(this.currentToken()) && this.peekToken(1).tokenKind === 86 /* EqualsGreaterThanToken */; }; ParserImpl.prototype.parseSimpleArrowFunctionExpression = function () { var identifier = this.eatIdentifierToken(); - var equalsGreaterThanToken = this.eatToken(85 /* EqualsGreaterThanToken */); + var equalsGreaterThanToken = this.eatToken(86 /* EqualsGreaterThanToken */); var body = this.parseArrowFunctionBody(); return this.factory.simpleArrowFunctionExpression(identifier, equalsGreaterThanToken, body); }; ParserImpl.prototype.isBlock = function () { - return this.currentToken().tokenKind === 70 /* OpenBraceToken */; + return this.currentToken().tokenKind === 71 /* OpenBraceToken */; }; ParserImpl.prototype.isDefinitelyArrowFunctionExpression = function () { var token0 = this.currentToken(); - if (token0.tokenKind !== 72 /* OpenParenToken */) { + if (token0.tokenKind !== 73 /* OpenParenToken */) { return false; } var token1 = this.peekToken(1); var token2; - if (token1.tokenKind === 73 /* CloseParenToken */) { + if (token1.tokenKind === 74 /* CloseParenToken */) { token2 = this.peekToken(2); - return token2.tokenKind === 106 /* ColonToken */ || token2.tokenKind === 85 /* EqualsGreaterThanToken */ || token2.tokenKind === 70 /* OpenBraceToken */; + return token2.tokenKind === 107 /* ColonToken */ || token2.tokenKind === 86 /* EqualsGreaterThanToken */ || token2.tokenKind === 71 /* OpenBraceToken */; } - if (token1.tokenKind === 77 /* DotDotDotToken */) { + if (token1.tokenKind === 78 /* DotDotDotToken */) { return true; } @@ -23960,19 +24028,19 @@ var TypeScript; } token2 = this.peekToken(2); - if (token2.tokenKind === 106 /* ColonToken */) { + if (token2.tokenKind === 107 /* ColonToken */) { return true; } var token3 = this.peekToken(3); - if (token2.tokenKind === 105 /* QuestionToken */) { - if (token3.tokenKind === 106 /* ColonToken */ || token3.tokenKind === 73 /* CloseParenToken */ || token3.tokenKind === 79 /* CommaToken */) { + if (token2.tokenKind === 106 /* QuestionToken */) { + if (token3.tokenKind === 107 /* ColonToken */ || token3.tokenKind === 74 /* CloseParenToken */ || token3.tokenKind === 80 /* CommaToken */) { return true; } } - if (token2.tokenKind === 73 /* CloseParenToken */) { - if (token3.tokenKind === 85 /* EqualsGreaterThanToken */) { + if (token2.tokenKind === 74 /* CloseParenToken */) { + if (token3.tokenKind === 86 /* EqualsGreaterThanToken */) { return true; } } @@ -23982,7 +24050,7 @@ var TypeScript; ParserImpl.prototype.isPossiblyArrowFunctionExpression = function () { var token0 = this.currentToken(); - if (token0.tokenKind !== 72 /* OpenParenToken */) { + if (token0.tokenKind !== 73 /* OpenParenToken */) { return true; } @@ -23993,17 +24061,17 @@ var TypeScript; } var token2 = this.peekToken(2); - if (token2.tokenKind === 107 /* EqualsToken */) { + if (token2.tokenKind === 108 /* EqualsToken */) { return true; } - if (token2.tokenKind === 79 /* CommaToken */) { + if (token2.tokenKind === 80 /* CommaToken */) { return true; } - if (token2.tokenKind === 73 /* CloseParenToken */) { + if (token2.tokenKind === 74 /* CloseParenToken */) { var token3 = this.peekToken(3); - if (token3.tokenKind === 106 /* ColonToken */) { + if (token3.tokenKind === 107 /* ColonToken */) { return true; } } @@ -24012,13 +24080,13 @@ var TypeScript; }; ParserImpl.prototype.parseObjectLiteralExpression = function () { - var openBraceToken = this.eatToken(70 /* OpenBraceToken */); + var openBraceToken = this.eatToken(71 /* OpenBraceToken */); var result = this.parseSeparatedSyntaxList(32768 /* ObjectLiteralExpression_PropertyAssignments */); var propertyAssignments = result.list; openBraceToken = this.addSkippedTokensAfterToken(openBraceToken, result.skippedTokens); - var closeBraceToken = this.eatToken(71 /* CloseBraceToken */); + var closeBraceToken = this.eatToken(72 /* CloseBraceToken */); return this.factory.objectLiteralExpression(openBraceToken, propertyAssignments, closeBraceToken); }; @@ -24042,14 +24110,14 @@ var TypeScript; }; ParserImpl.prototype.isGetAccessorPropertyAssignment = function (inErrorRecovery) { - return this.currentToken().tokenKind === 64 /* GetKeyword */ && this.isPropertyName(this.peekToken(1), inErrorRecovery); + return this.currentToken().tokenKind === 65 /* GetKeyword */ && this.isPropertyName(this.peekToken(1), inErrorRecovery); }; ParserImpl.prototype.parseGetAccessorPropertyAssignment = function () { - var getKeyword = this.eatKeyword(64 /* GetKeyword */); + var getKeyword = this.eatKeyword(65 /* GetKeyword */); var propertyName = this.eatPropertyName(); - var openParenToken = this.eatToken(72 /* OpenParenToken */); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); var typeAnnotation = this.parseOptionalTypeAnnotation(false); var block = this.parseBlock(false, true); @@ -24057,15 +24125,15 @@ var TypeScript; }; ParserImpl.prototype.isSetAccessorPropertyAssignment = function (inErrorRecovery) { - return this.currentToken().tokenKind === 68 /* SetKeyword */ && this.isPropertyName(this.peekToken(1), inErrorRecovery); + return this.currentToken().tokenKind === 69 /* SetKeyword */ && this.isPropertyName(this.peekToken(1), inErrorRecovery); }; ParserImpl.prototype.parseSetAccessorPropertyAssignment = function () { - var setKeyword = this.eatKeyword(68 /* SetKeyword */); + var setKeyword = this.eatKeyword(69 /* SetKeyword */); var propertyName = this.eatPropertyName(); - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var parameter = this.parseParameter(); - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); var block = this.parseBlock(false, true); return this.factory.setAccessorPropertyAssignment(setKeyword, propertyName, openParenToken, parameter, closeParenToken, block); @@ -24093,7 +24161,7 @@ var TypeScript; ParserImpl.prototype.parseSimplePropertyAssignment = function () { var propertyName = this.eatPropertyName(); - var colonToken = this.eatToken(106 /* ColonToken */); + var colonToken = this.eatToken(107 /* ColonToken */); var expression = this.parseAssignmentExpression(true); return this.factory.simplePropertyAssignment(propertyName, colonToken, expression); @@ -24119,13 +24187,13 @@ var TypeScript; }; ParserImpl.prototype.parseArrayLiteralExpression = function () { - var openBracketToken = this.eatToken(74 /* OpenBracketToken */); + var openBracketToken = this.eatToken(75 /* OpenBracketToken */); var result = this.parseSeparatedSyntaxList(65536 /* ArrayLiteralExpression_AssignmentExpressions */); var expressions = result.list; openBracketToken = this.addSkippedTokensAfterToken(openBracketToken, result.skippedTokens); - var closeBracketToken = this.eatToken(75 /* CloseBracketToken */); + var closeBracketToken = this.eatToken(76 /* CloseBracketToken */); return this.factory.arrayLiteralExpression(openBracketToken, expressions, closeBracketToken); }; @@ -24140,7 +24208,7 @@ var TypeScript; }; ParserImpl.prototype.parseBlock = function (parseBlockEvenWithNoOpenBrace, checkForStrictMode) { - var openBraceToken = this.eatToken(70 /* OpenBraceToken */); + var openBraceToken = this.eatToken(71 /* OpenBraceToken */); var statements = TypeScript.Syntax.emptyList; @@ -24155,7 +24223,7 @@ var TypeScript; this.setStrictMode(savedIsInStrictMode); } - var closeBraceToken = this.eatToken(71 /* CloseBraceToken */); + var closeBraceToken = this.eatToken(72 /* CloseBraceToken */); return this.factory.block(openBraceToken, statements, closeBraceToken); }; @@ -24169,19 +24237,19 @@ var TypeScript; }; ParserImpl.prototype.parseOptionalTypeParameterList = function (requireCompleteTypeParameterList) { - if (this.currentToken().tokenKind !== 80 /* LessThanToken */) { + if (this.currentToken().tokenKind !== 81 /* LessThanToken */) { return null; } var rewindPoint = this.getRewindPoint(); try { - var lessThanToken = this.eatToken(80 /* LessThanToken */); + var lessThanToken = this.eatToken(81 /* LessThanToken */); var result = this.parseSeparatedSyntaxList(524288 /* TypeParameterList_TypeParameters */); var typeParameterList = result.list; lessThanToken = this.addSkippedTokensAfterToken(lessThanToken, result.skippedTokens); - var greaterThanToken = this.eatToken(81 /* GreaterThanToken */); + var greaterThanToken = this.eatToken(82 /* GreaterThanToken */); if (requireCompleteTypeParameterList && greaterThanToken.fullWidth() === 0) { this.rewind(rewindPoint); @@ -24217,7 +24285,7 @@ var TypeScript; }; ParserImpl.prototype.parseParameterList = function () { - var openParenToken = this.eatToken(72 /* OpenParenToken */); + var openParenToken = this.eatToken(73 /* OpenParenToken */); var parameters = TypeScript.Syntax.emptySeparatedList; if (openParenToken.width() > 0) { @@ -24226,12 +24294,12 @@ var TypeScript; openParenToken = this.addSkippedTokensAfterToken(openParenToken, result.skippedTokens); } - var closeParenToken = this.eatToken(73 /* CloseParenToken */); + var closeParenToken = this.eatToken(74 /* CloseParenToken */); return this.factory.parameterList(openParenToken, parameters, closeParenToken); }; ParserImpl.prototype.isTypeAnnotation = function () { - return this.currentToken().tokenKind === 106 /* ColonToken */; + return this.currentToken().tokenKind === 107 /* ColonToken */; }; ParserImpl.prototype.parseOptionalTypeAnnotation = function (allowStringLiteral) { @@ -24239,7 +24307,7 @@ var TypeScript; }; ParserImpl.prototype.parseTypeAnnotation = function (allowStringLiteral) { - var colonToken = this.eatToken(106 /* ColonToken */); + var colonToken = this.eatToken(107 /* ColonToken */); var type = allowStringLiteral && this.currentToken().tokenKind === 14 /* StringLiteral */ ? this.eatToken(14 /* StringLiteral */) : this.parseType(); return this.factory.typeAnnotation(colonToken, type); @@ -24255,9 +24323,9 @@ var TypeScript; } else { var type = this.parseNonArrayType(); - while (this.currentToken().tokenKind === 74 /* OpenBracketToken */) { - var openBracketToken = this.eatToken(74 /* OpenBracketToken */); - var closeBracketToken = this.eatToken(75 /* CloseBracketToken */); + while (this.currentToken().tokenKind === 75 /* OpenBracketToken */) { + var openBracketToken = this.eatToken(75 /* OpenBracketToken */); + var closeBracketToken = this.eatToken(76 /* CloseBracketToken */); type = this.factory.arrayType(type, openBracketToken, closeBracketToken); } @@ -24309,7 +24377,7 @@ var TypeScript; ParserImpl.prototype.parseFunctionType = function () { var typeParameterList = this.parseOptionalTypeParameterList(false); var parameterList = this.parseParameterList(); - var equalsGreaterThanToken = this.eatToken(85 /* EqualsGreaterThanToken */); + var equalsGreaterThanToken = this.eatToken(86 /* EqualsGreaterThanToken */); var returnType = this.parseType(); return this.factory.functionType(typeParameterList, parameterList, equalsGreaterThanToken, returnType); @@ -24318,7 +24386,7 @@ var TypeScript; ParserImpl.prototype.parseConstructorType = function () { var newKeyword = this.eatKeyword(31 /* NewKeyword */); var parameterList = this.parseParameterList(); - var equalsGreaterThanToken = this.eatToken(85 /* EqualsGreaterThanToken */); + var equalsGreaterThanToken = this.eatToken(86 /* EqualsGreaterThanToken */); var type = this.parseType(); return this.factory.constructorType(newKeyword, null, parameterList, equalsGreaterThanToken, type); @@ -24329,12 +24397,12 @@ var TypeScript; }; ParserImpl.prototype.isObjectType = function () { - return this.currentToken().tokenKind === 70 /* OpenBraceToken */; + return this.currentToken().tokenKind === 71 /* OpenBraceToken */; }; ParserImpl.prototype.isFunctionType = function () { var tokenKind = this.currentToken().tokenKind; - return tokenKind === 72 /* OpenParenToken */ || tokenKind === 80 /* LessThanToken */; + return tokenKind === 73 /* OpenParenToken */ || tokenKind === 81 /* LessThanToken */; }; ParserImpl.prototype.isConstructorType = function () { @@ -24348,9 +24416,10 @@ var TypeScript; ParserImpl.prototype.isPredefinedType = function () { switch (this.currentToken().tokenKind) { case 60 /* AnyKeyword */: - case 67 /* NumberKeyword */: + case 68 /* NumberKeyword */: case 61 /* BooleanKeyword */: - case 69 /* StringKeyword */: + case 62 /* BoolKeyword */: + case 70 /* StringKeyword */: case 41 /* VoidKeyword */: return true; } @@ -24359,12 +24428,12 @@ var TypeScript; }; ParserImpl.prototype.isParameter = function () { - if (this.currentNode() !== null && this.currentNode().kind() === 242 /* Parameter */) { + if (this.currentNode() !== null && this.currentNode().kind() === 243 /* Parameter */) { return true; } var token = this.currentToken(); - if (token.tokenKind === 77 /* DotDotDotToken */) { + if (token.tokenKind === 78 /* DotDotDotToken */) { return true; } @@ -24376,11 +24445,11 @@ var TypeScript; }; ParserImpl.prototype.parseParameter = function () { - if (this.currentNode() !== null && this.currentNode().kind() === 242 /* Parameter */) { + if (this.currentNode() !== null && this.currentNode().kind() === 243 /* Parameter */) { return this.eatNode(); } - var dotDotDotToken = this.tryEatToken(77 /* DotDotDotToken */); + var dotDotDotToken = this.tryEatToken(78 /* DotDotDotToken */); var publicOrPrivateToken = null; if (ParserImpl.isPublicOrPrivateKeyword(this.currentToken())) { @@ -24388,7 +24457,7 @@ var TypeScript; } var identifier = this.eatIdentifierToken(); - var questionToken = this.tryEatToken(105 /* QuestionToken */); + var questionToken = this.tryEatToken(106 /* QuestionToken */); var typeAnnotation = this.parseOptionalTypeAnnotation(true); var equalsValueClause = null; @@ -24526,7 +24595,7 @@ var TypeScript; TypeScript.Debug.assert(skippedTokens !== items); var separatorKind = this.separatorKind(currentListType); - var allowAutomaticSemicolonInsertion = separatorKind === 78 /* SemicolonToken */; + var allowAutomaticSemicolonInsertion = separatorKind === 79 /* SemicolonToken */; var inErrorRecovery = false; var listWasTerminated = false; @@ -24554,7 +24623,7 @@ var TypeScript; inErrorRecovery = false; var currentToken = this.currentToken(); - if (currentToken.tokenKind === separatorKind || currentToken.tokenKind === 79 /* CommaToken */) { + if (currentToken.tokenKind === separatorKind || currentToken.tokenKind === 80 /* CommaToken */) { items.push(this.eatAnyToken()); continue; } @@ -24594,10 +24663,10 @@ var TypeScript; case 65536 /* ArrayLiteralExpression_AssignmentExpressions */: case 262144 /* TypeArgumentList_Types */: case 524288 /* TypeParameterList_TypeParameters */: - return 79 /* CommaToken */; + return 80 /* CommaToken */; case 512 /* ObjectType_TypeMembers */: - return 78 /* SemicolonToken */; + return 79 /* SemicolonToken */; case 1 /* SourceUnit_ModuleElements */: case 1024 /* ClassOrInterfaceDeclaration_HeritageClauses */: @@ -24698,28 +24767,28 @@ var TypeScript; }; ParserImpl.prototype.isExpectedEnumDeclaration_EnumElementsTerminator = function () { - return this.currentToken().tokenKind === 71 /* CloseBraceToken */; + return this.currentToken().tokenKind === 72 /* CloseBraceToken */; }; ParserImpl.prototype.isExpectedModuleDeclaration_ModuleElementsTerminator = function () { - return this.currentToken().tokenKind === 71 /* CloseBraceToken */; + return this.currentToken().tokenKind === 72 /* CloseBraceToken */; }; ParserImpl.prototype.isExpectedObjectType_TypeMembersTerminator = function () { - return this.currentToken().tokenKind === 71 /* CloseBraceToken */; + return this.currentToken().tokenKind === 72 /* CloseBraceToken */; }; ParserImpl.prototype.isExpectedObjectLiteralExpression_PropertyAssignmentsTerminator = function () { - return this.currentToken().tokenKind === 71 /* CloseBraceToken */; + return this.currentToken().tokenKind === 72 /* CloseBraceToken */; }; ParserImpl.prototype.isExpectedLiteralExpression_AssignmentExpressionsTerminator = function () { - return this.currentToken().tokenKind === 75 /* CloseBracketToken */; + return this.currentToken().tokenKind === 76 /* CloseBracketToken */; }; ParserImpl.prototype.isExpectedTypeArgumentList_TypesTerminator = function () { var token = this.currentToken(); - if (token.tokenKind === 81 /* GreaterThanToken */) { + if (token.tokenKind === 82 /* GreaterThanToken */) { return true; } @@ -24732,11 +24801,11 @@ var TypeScript; ParserImpl.prototype.isExpectedTypeParameterList_TypeParametersTerminator = function () { var token = this.currentToken(); - if (token.tokenKind === 81 /* GreaterThanToken */) { + if (token.tokenKind === 82 /* GreaterThanToken */) { return true; } - if (token.tokenKind === 72 /* OpenParenToken */ || token.tokenKind === 70 /* OpenBraceToken */ || token.tokenKind === 48 /* ExtendsKeyword */ || token.tokenKind === 51 /* ImplementsKeyword */) { + if (token.tokenKind === 73 /* OpenParenToken */ || token.tokenKind === 71 /* OpenBraceToken */ || token.tokenKind === 48 /* ExtendsKeyword */ || token.tokenKind === 51 /* ImplementsKeyword */) { return true; } @@ -24745,15 +24814,15 @@ var TypeScript; ParserImpl.prototype.isExpectedParameterList_ParametersTerminator = function () { var token = this.currentToken(); - if (token.tokenKind === 73 /* CloseParenToken */) { + if (token.tokenKind === 74 /* CloseParenToken */) { return true; } - if (token.tokenKind === 70 /* OpenBraceToken */) { + if (token.tokenKind === 71 /* OpenBraceToken */) { return true; } - if (token.tokenKind === 85 /* EqualsGreaterThanToken */) { + if (token.tokenKind === 86 /* EqualsGreaterThanToken */) { return true; } @@ -24761,7 +24830,7 @@ var TypeScript; }; ParserImpl.prototype.isExpectedVariableDeclaration_VariableDeclarators_DisallowInTerminator = function () { - if (this.currentToken().tokenKind === 78 /* SemicolonToken */ || this.currentToken().tokenKind === 73 /* CloseParenToken */) { + if (this.currentToken().tokenKind === 79 /* SemicolonToken */ || this.currentToken().tokenKind === 74 /* CloseParenToken */) { return true; } @@ -24773,11 +24842,11 @@ var TypeScript; }; ParserImpl.prototype.isExpectedVariableDeclaration_VariableDeclarators_AllowInTerminator = function () { - if (this.previousToken().tokenKind === 79 /* CommaToken */) { + if (this.previousToken().tokenKind === 80 /* CommaToken */) { return false; } - if (this.currentToken().tokenKind === 85 /* EqualsGreaterThanToken */) { + if (this.currentToken().tokenKind === 86 /* EqualsGreaterThanToken */) { return true; } @@ -24786,7 +24855,7 @@ var TypeScript; ParserImpl.prototype.isExpectedClassOrInterfaceDeclaration_HeritageClausesTerminator = function () { var token0 = this.currentToken(); - if (token0.tokenKind === 70 /* OpenBraceToken */ || token0.tokenKind === 71 /* CloseBraceToken */) { + if (token0.tokenKind === 71 /* OpenBraceToken */ || token0.tokenKind === 72 /* CloseBraceToken */) { return true; } @@ -24808,23 +24877,23 @@ var TypeScript; ParserImpl.prototype.isExpectedArgumentList_AssignmentExpressionsTerminator = function () { var token0 = this.currentToken(); - return token0.tokenKind === 73 /* CloseParenToken */ || token0.tokenKind === 78 /* SemicolonToken */; + return token0.tokenKind === 74 /* CloseParenToken */ || token0.tokenKind === 79 /* SemicolonToken */; }; ParserImpl.prototype.isExpectedClassDeclaration_ClassElementsTerminator = function () { - return this.currentToken().tokenKind === 71 /* CloseBraceToken */; + return this.currentToken().tokenKind === 72 /* CloseBraceToken */; }; ParserImpl.prototype.isExpectedSwitchStatement_SwitchClausesTerminator = function () { - return this.currentToken().tokenKind === 71 /* CloseBraceToken */; + return this.currentToken().tokenKind === 72 /* CloseBraceToken */; }; ParserImpl.prototype.isExpectedSwitchClause_StatementsTerminator = function () { - return this.currentToken().tokenKind === 71 /* CloseBraceToken */ || this.isSwitchClause(); + return this.currentToken().tokenKind === 72 /* CloseBraceToken */ || this.isSwitchClause(); }; ParserImpl.prototype.isExpectedBlock_StatementsTerminator = function () { - return this.currentToken().tokenKind === 71 /* CloseBraceToken */; + return this.currentToken().tokenKind === 72 /* CloseBraceToken */; }; ParserImpl.prototype.isExpectedTryBlock_StatementsTerminator = function () { @@ -24903,7 +24972,7 @@ var TypeScript; return true; } - if (this.currentToken().tokenKind === 79 /* CommaToken */) { + if (this.currentToken().tokenKind === 80 /* CommaToken */) { return true; } @@ -25347,7 +25416,7 @@ var TypeScript; } else if (!parameter.typeAnnotation) { this.pushDiagnostic1(parameterFullStart, parameter, TypeScript.DiagnosticCode.Index_signature_parameter_must_have_a_type_annotation); return true; - } else if (parameter.typeAnnotation.type.kind() !== 69 /* StringKeyword */ && parameter.typeAnnotation.type.kind() !== 67 /* NumberKeyword */) { + } else if (parameter.typeAnnotation.type.kind() !== 70 /* StringKeyword */ && parameter.typeAnnotation.type.kind() !== 68 /* NumberKeyword */) { this.pushDiagnostic1(parameterFullStart, parameter, TypeScript.DiagnosticCode.Index_signature_parameter_type_must_be_string_or_number); return true; } @@ -25415,7 +25484,7 @@ var TypeScript; GrammarCheckerWalker.prototype.checkForDisallowedDeclareModifier = function (modifiers) { if (this.inAmbientDeclaration) { - var declareToken = TypeScript.SyntaxUtilities.getToken(modifiers, 63 /* DeclareKeyword */); + var declareToken = TypeScript.SyntaxUtilities.getToken(modifiers, 64 /* DeclareKeyword */); if (declareToken) { this.pushDiagnostic1(this.childFullStart(modifiers, declareToken), declareToken, TypeScript.DiagnosticCode.declare_modifier_not_allowed_for_code_already_in_an_ambient_context); @@ -25428,7 +25497,7 @@ var TypeScript; GrammarCheckerWalker.prototype.checkForRequiredDeclareModifier = function (moduleElement, typeKeyword, modifiers) { if (!this.inAmbientDeclaration && this.syntaxTree.isDeclaration()) { - if (!TypeScript.SyntaxUtilities.containsToken(modifiers, 63 /* DeclareKeyword */)) { + if (!TypeScript.SyntaxUtilities.containsToken(modifiers, 64 /* DeclareKeyword */)) { this.pushDiagnostic1(this.childFullStart(moduleElement, typeKeyword), typeKeyword.firstToken(), TypeScript.DiagnosticCode.declare_modifier_required_for_top_level_element); return true; } @@ -25447,7 +25516,7 @@ var TypeScript; var lastElement = i === (n - 1); if (inFunctionOverloadChain) { - if (moduleElement.kind() !== 129 /* FunctionDeclaration */) { + if (moduleElement.kind() !== 130 /* FunctionDeclaration */) { this.pushDiagnostic1(moduleElementFullStart, moduleElement.firstToken(), TypeScript.DiagnosticCode.Function_implementation_expected); return true; } @@ -25460,9 +25529,9 @@ var TypeScript; } } - if (moduleElement.kind() === 129 /* FunctionDeclaration */) { + if (moduleElement.kind() === 130 /* FunctionDeclaration */) { functionDeclaration = moduleElement; - if (!TypeScript.SyntaxUtilities.containsToken(functionDeclaration.modifiers, 63 /* DeclareKeyword */)) { + if (!TypeScript.SyntaxUtilities.containsToken(functionDeclaration.modifiers, 64 /* DeclareKeyword */)) { inFunctionOverloadChain = functionDeclaration.block === null; functionOverloadChainName = functionDeclaration.identifier.valueText(); @@ -25484,7 +25553,7 @@ var TypeScript; }; GrammarCheckerWalker.prototype.checkClassOverloads = function (node) { - if (!this.inAmbientDeclaration && !TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */)) { + if (!this.inAmbientDeclaration && !TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */)) { var classElementFullStart = this.childFullStart(node, node.classElements); var inFunctionOverloadChain = false; @@ -25500,7 +25569,7 @@ var TypeScript; var isStaticOverload = null; if (inFunctionOverloadChain) { - if (classElement.kind() !== 135 /* MemberFunctionDeclaration */) { + if (classElement.kind() !== 136 /* MemberFunctionDeclaration */) { this.pushDiagnostic1(classElementFullStart, classElement.firstToken(), TypeScript.DiagnosticCode.Function_implementation_expected); return true; } @@ -25519,13 +25588,13 @@ var TypeScript; return true; } } else if (inConstructorOverloadChain) { - if (classElement.kind() !== 137 /* ConstructorDeclaration */) { + if (classElement.kind() !== 138 /* ConstructorDeclaration */) { this.pushDiagnostic1(classElementFullStart, classElement.firstToken(), TypeScript.DiagnosticCode.Constructor_implementation_expected); return true; } } - if (classElement.kind() === 135 /* MemberFunctionDeclaration */) { + if (classElement.kind() === 136 /* MemberFunctionDeclaration */) { memberFunctionDeclaration = classElement; inFunctionOverloadChain = memberFunctionDeclaration.block === null; @@ -25536,7 +25605,7 @@ var TypeScript; this.pushDiagnostic1(classElementFullStart, classElement.firstToken(), TypeScript.DiagnosticCode.Function_implementation_expected); return true; } - } else if (classElement.kind() === 137 /* ConstructorDeclaration */) { + } else if (classElement.kind() === 138 /* ConstructorDeclaration */) { var constructorDeclaration = classElement; inConstructorOverloadChain = constructorDeclaration.block === null; @@ -25560,7 +25629,7 @@ var TypeScript; var current = name; while (current !== null) { - if (current.kind() === 121 /* QualifiedName */) { + if (current.kind() === 122 /* QualifiedName */) { var qualifiedName = current; token = qualifiedName.right; tokenFullStart = nameFullStart + this.childFullStart(qualifiedName, token); @@ -25575,6 +25644,7 @@ var TypeScript; switch (token.valueText()) { case "any": case "number": + case "bool": case "boolean": case "string": case "void": @@ -25593,7 +25663,7 @@ var TypeScript; } var savedInAmbientDeclaration = this.inAmbientDeclaration; - this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */); + this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */); _super.prototype.visitClassDeclaration.call(this, node); this.inAmbientDeclaration = savedInAmbientDeclaration; }; @@ -25631,7 +25701,7 @@ var TypeScript; for (var i = 0, n = modifiers.childCount(); i < n; i++) { var modifier = modifiers.childAt(i); - if (modifier.tokenKind === 63 /* DeclareKeyword */) { + if (modifier.tokenKind === 64 /* DeclareKeyword */) { this.pushDiagnostic1(modifierFullStart, modifier, TypeScript.DiagnosticCode.declare_modifier_cannot_appear_on_an_interface_declaration); return true; } @@ -25805,7 +25875,7 @@ var TypeScript; } var savedInAmbientDeclaration = this.inAmbientDeclaration; - this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */); + this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */); _super.prototype.visitEnumDeclaration.call(this, node); this.inAmbientDeclaration = savedInAmbientDeclaration; }; @@ -25872,7 +25942,7 @@ var TypeScript; return true; } - if (modifier.tokenKind === 63 /* DeclareKeyword */) { + if (modifier.tokenKind === 64 /* DeclareKeyword */) { if (seenDeclareModifier) { this.pushDiagnostic1(modifierFullStart, modifier, TypeScript.DiagnosticCode.Accessibility_modifier_already_seen); return; @@ -25886,7 +25956,7 @@ var TypeScript; } if (seenDeclareModifier) { - this.pushDiagnostic1(modifierFullStart, modifier, TypeScript.DiagnosticCode._0_modifier_must_precede_1_modifier, [TypeScript.SyntaxFacts.getText(47 /* ExportKeyword */), TypeScript.SyntaxFacts.getText(63 /* DeclareKeyword */)]); + this.pushDiagnostic1(modifierFullStart, modifier, TypeScript.DiagnosticCode._0_modifier_must_precede_1_modifier, [TypeScript.SyntaxFacts.getText(47 /* ExportKeyword */), TypeScript.SyntaxFacts.getText(64 /* DeclareKeyword */)]); return; } @@ -25905,9 +25975,9 @@ var TypeScript; for (var i = 0, n = node.moduleElements.childCount(); i < n; i++) { var child = node.moduleElements.childAt(i); - if (child.kind() === 133 /* ImportDeclaration */) { + if (child.kind() === 134 /* ImportDeclaration */) { var importDeclaration = child; - if (importDeclaration.moduleReference.kind() === 245 /* ExternalModuleReference */) { + if (importDeclaration.moduleReference.kind() === 246 /* ExternalModuleReference */) { this.pushDiagnostic1(currentElementFullStart, importDeclaration, TypeScript.DiagnosticCode.Import_declarations_in_an_internal_module_cannot_reference_an_external_module, null); } } @@ -25920,7 +25990,7 @@ var TypeScript; }; GrammarCheckerWalker.prototype.checkForDisallowedDeclareModifierOnImportDeclaration = function (modifiers) { - var declareToken = TypeScript.SyntaxUtilities.getToken(modifiers, 63 /* DeclareKeyword */); + var declareToken = TypeScript.SyntaxUtilities.getToken(modifiers, 64 /* DeclareKeyword */); if (declareToken) { this.pushDiagnostic1(this.childFullStart(modifiers, declareToken), declareToken, TypeScript.DiagnosticCode.declare_modifier_not_allowed_on_import_declaration); @@ -25943,13 +26013,13 @@ var TypeScript; return; } - if (!TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */) && this.checkFunctionOverloads(node, node.moduleElements)) { + if (!TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */) && this.checkFunctionOverloads(node, node.moduleElements)) { this.skip(node); return; } if (node.stringLiteral) { - if (!this.inAmbientDeclaration && !TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */)) { + if (!this.inAmbientDeclaration && !TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */)) { var stringLiteralFullStart = this.childFullStart(node, node.stringLiteral); this.pushDiagnostic1(stringLiteralFullStart, node.stringLiteral, TypeScript.DiagnosticCode.Only_ambient_modules_can_use_quoted_names); this.skip(node); @@ -25963,7 +26033,7 @@ var TypeScript; } var savedInAmbientDeclaration = this.inAmbientDeclaration; - this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */); + this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */); _super.prototype.visitModuleDeclaration.call(this, node); this.inAmbientDeclaration = savedInAmbientDeclaration; }; @@ -25984,7 +26054,7 @@ var TypeScript; for (var i = 0, n = moduleElements.childCount(); i < n; i++) { var child = moduleElements.childAt(i); - if (child.kind() === 134 /* ExportAssignment */) { + if (child.kind() === 135 /* ExportAssignment */) { this.pushDiagnostic1(moduleElementFullStart, child, TypeScript.DiagnosticCode.Export_assignment_not_allowed_in_module_with_exported_element); return true; } @@ -26002,7 +26072,7 @@ var TypeScript; var errorFound = false; for (var i = 0, n = moduleElements.childCount(); i < n; i++) { var child = moduleElements.childAt(i); - if (child.kind() === 134 /* ExportAssignment */) { + if (child.kind() === 135 /* ExportAssignment */) { if (seenExportAssignment) { this.pushDiagnostic1(moduleElementFullStart, child, TypeScript.DiagnosticCode.Module_cannot_have_multiple_export_assignments); errorFound = true; @@ -26022,7 +26092,7 @@ var TypeScript; for (var i = 0, n = node.moduleElements.childCount(); i < n; i++) { var child = node.moduleElements.childAt(i); - if (child.kind() === 134 /* ExportAssignment */) { + if (child.kind() === 135 /* ExportAssignment */) { this.pushDiagnostic1(moduleElementFullStart, child, TypeScript.DiagnosticCode.Export_assignment_cannot_be_used_in_internal_modules); return true; @@ -26222,7 +26292,7 @@ var TypeScript; } var savedInAmbientDeclaration = this.inAmbientDeclaration; - this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */); + this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */); _super.prototype.visitFunctionDeclaration.call(this, node); this.inAmbientDeclaration = savedInAmbientDeclaration; }; @@ -26234,7 +26304,7 @@ var TypeScript; } var savedInAmbientDeclaration = this.inAmbientDeclaration; - this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */); + this.inAmbientDeclaration = this.inAmbientDeclaration || this.syntaxTree.isDeclaration() || TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */); _super.prototype.visitVariableStatement.call(this, node); this.inAmbientDeclaration = savedInAmbientDeclaration; }; @@ -26255,7 +26325,7 @@ var TypeScript; }; GrammarCheckerWalker.prototype.visitObjectType = function (node) { - if (this.checkListSeparators(node, node.typeMembers, 78 /* SemicolonToken */)) { + if (this.checkListSeparators(node, node.typeMembers, 79 /* SemicolonToken */)) { this.skip(node); return; } @@ -26312,6 +26382,16 @@ var TypeScript; _super.prototype.visitSourceUnit.call(this, node); }; + + GrammarCheckerWalker.prototype.visitExternalModuleReference = function (node) { + if (node.moduleOrRequireKeyword.tokenKind === 66 /* ModuleKeyword */ && !this.syntaxTree.parseOptions().allowModuleKeywordInExternalModuleReference()) { + this.pushDiagnostic1(this.position(), node.moduleOrRequireKeyword, TypeScript.DiagnosticCode.module_is_deprecated_Use_require_instead); + this.skip(node); + return; + } + + _super.prototype.visitExternalModuleReference.call(this, node); + }; return GrammarCheckerWalker; })(TypeScript.PositionTrackingWalker); })(TypeScript || (TypeScript = {})); @@ -30140,6 +30220,15 @@ var TypeScript; } TypeScript.filePath = filePath; + function convertToDirectoryPath(dirPath) { + if (dirPath && dirPath.charAt(dirPath.length - 1) !== "/") { + dirPath += "/"; + } + + return dirPath; + } + TypeScript.convertToDirectoryPath = convertToDirectoryPath; + var normalizePathRegEx = /^\\\\[^\\]/; function normalizePath(path) { if (normalizePathRegEx.test(path)) { @@ -30174,7 +30263,9 @@ var TypeScript; this.removeComments = false; this.watch = false; this.noResolve = false; + this.allowBool = false; this.allowAutomaticSemicolonInsertion = true; + this.allowModuleKeywordInExternalModuleReference = false; this.noImplicitAny = false; this.noLib = false; this.codeGenTarget = 0 /* EcmaScript3 */; @@ -30188,6 +30279,7 @@ var TypeScript; this.useCaseSensitiveFileResolution = false; this.gatherDiagnostics = false; this.updateTC = false; + this.codepage = null; } return CompilationSettings; })(); @@ -30251,13 +30343,13 @@ var TypeScript; if (TypeScript.SyntaxFacts.isIdentifierNameOrAnyKeyword(token)) { token = scanner.scan(scannerDiagnostics, false); - if (token.tokenKind === 107 /* EqualsToken */) { + if (token.tokenKind === 108 /* EqualsToken */) { token = scanner.scan(scannerDiagnostics, false); - if (token.tokenKind === 65 /* ModuleKeyword */ || token.tokenKind === 66 /* RequireKeyword */) { + if (token.tokenKind === 66 /* ModuleKeyword */ || token.tokenKind === 67 /* RequireKeyword */) { token = scanner.scan(scannerDiagnostics, false); - if (token.tokenKind === 72 /* OpenParenToken */) { + if (token.tokenKind === 73 /* OpenParenToken */) { var afterOpenParenPosition = scanner.absoluteIndex(); token = scanner.scan(scannerDiagnostics, false); @@ -30347,7 +30439,7 @@ var TypeScript; TypeScript.preProcessFile = preProcessFile; function getParseOptions(settings) { - return new TypeScript.ParseOptions(settings.codeGenTarget, settings.allowAutomaticSemicolonInsertion); + return new TypeScript.ParseOptions(settings.codeGenTarget, settings.allowAutomaticSemicolonInsertion, settings.allowModuleKeywordInExternalModuleReference); } TypeScript.getParseOptions = getParseOptions; })(TypeScript || (TypeScript = {})); @@ -31409,6 +31501,16 @@ var TypeScript; return false; }; + DeclarationEmitter.prototype.resolveScriptReference = function (document, reference) { + if (!this.compiler.settings.noResolve || TypeScript.isRooted(reference)) { + return reference; + } + + var documentDir = TypeScript.convertToDirectoryPath(TypeScript.switchToForwardSlashes(TypeScript.getRootFilePath(document.fileName))); + var resolvedReferencePath = this.compiler.emitOptions.ioHost.resolvePath(documentDir + reference); + return resolvedReferencePath; + }; + DeclarationEmitter.prototype.emitReferencePaths = function (script) { if (this.emittedReferencePaths) { return; @@ -31419,10 +31521,10 @@ var TypeScript; var scriptReferences = script.referencedFiles; var addedGlobalDocument = false; for (var j = 0; j < scriptReferences.length; j++) { - var currentReference = scriptReferences[j]; + var currentReference = this.resolveScriptReference(this.document, scriptReferences[j]); var document = this.compiler.getDocument(currentReference); - if (this.compiler.emitOptions.outputMany || document.script.isDeclareFile || document.script.topLevelMod || !addedGlobalDocument) { + if (document && (this.compiler.emitOptions.outputMany || document.script.isDeclareFile || document.script.topLevelMod || !addedGlobalDocument)) { documents = documents.concat(document); if (!document.script.isDeclareFile && document.script.topLevelMod) { addedGlobalDocument = true; @@ -31435,10 +31537,10 @@ var TypeScript; if (!allDocuments[i].script.isDeclareFile && !allDocuments[i].script.topLevelMod) { var scriptReferences = allDocuments[i].script.referencedFiles; for (var j = 0; j < scriptReferences.length; j++) { - var currentReference = scriptReferences[j]; + var currentReference = this.resolveScriptReference(allDocuments[i], scriptReferences[j]); var document = this.compiler.getDocument(currentReference); - if (document.script.isDeclareFile || document.script.topLevelMod) { + if (document && (document.script.isDeclareFile || document.script.topLevelMod)) { for (var k = 0; k < documents.length; k++) { if (documents[k] == document) { break; @@ -32568,6 +32670,10 @@ var TypeScript; return true; } + if (this.rootSymbol) { + return PullSymbol.getIsExternallyVisible(this.rootSymbol, this, inIsExternallyVisibleSymbols); + } + if (this.isType()) { var associatedContainerSymbol = (this).getAssociatedContainerType(); if (associatedContainerSymbol) { @@ -32581,6 +32687,19 @@ var TypeScript; var container = this.getContainer(); if (container === null) { + var decls = this.getDeclarations(); + if (decls.length) { + var parentDecl = decls[0].getParentDecl(); + if (parentDecl) { + var parentSymbol = parentDecl.getSymbol(); + if (!parentSymbol || parentDecl.kind == 1 /* Script */) { + return true; + } + + return PullSymbol.getIsExternallyVisible(parentSymbol, this, inIsExternallyVisibleSymbols); + } + } + return true; } @@ -34707,7 +34826,7 @@ var TypeScript; newSignature.mimicSignature(signature, resolver); declAST = resolver.semanticInfoChain.getASTForDecl(decl); - TypeScript.Debug.assert(declAST != null, "Call signature for type '" + typeToSpecialize.toString() + "' could not be specialized because of a stale declaration"); + TypeScript.Debug.assert(declAST != null, "Call signature for type '" + typeToSpecialize.pullSymbolIDString + "' could not be specialized because of a stale declaration"); prevSpecializationSignature = decl.getSpecializingSignatureSymbol(); decl.setSpecializingSignatureSymbol(newSignature); @@ -34779,7 +34898,7 @@ var TypeScript; newSignature.mimicSignature(signature, resolver); declAST = resolver.semanticInfoChain.getASTForDecl(decl); - TypeScript.Debug.assert(declAST != null, "Construct signature for type '" + typeToSpecialize.toString() + "' could not be specialized because of a stale declaration"); + TypeScript.Debug.assert(declAST != null, "Construct signature for type '" + typeToSpecialize.pullSymbolIDString + "' could not be specialized because of a stale declaration"); prevSpecializationSignature = decl.getSpecializingSignatureSymbol(); decl.setSpecializingSignatureSymbol(newSignature); @@ -34851,7 +34970,7 @@ var TypeScript; newSignature.mimicSignature(signature, resolver); declAST = resolver.semanticInfoChain.getASTForDecl(decl); - TypeScript.Debug.assert(declAST != null, "Index signature for type '" + typeToSpecialize.toString() + "' could not be specialized because of a stale declaration"); + TypeScript.Debug.assert(declAST != null, "Index signature for type '" + typeToSpecialize.pullSymbolIDString + "' could not be specialized because of a stale declaration"); prevSpecializationSignature = decl.getSpecializingSignatureSymbol(); decl.setSpecializingSignatureSymbol(newSignature); @@ -35118,9 +35237,22 @@ var TypeScript; function getIDForTypeSubstitutions(types) { var substitution = ""; + var members = null; for (var i = 0; i < types.length; i++) { - substitution += types[i].pullSymbolIDString + "#"; + if (types[i].kind != 8388608 /* ObjectType */) { + substitution += types[i].pullSymbolIDString + "#"; + } else { + members = types[i].getMembers(); + + if (types[i].isResolved && members && members.length) { + for (var j = 0; j < members.length; j++) { + substitution += members[j].name + "@" + getIDForTypeSubstitutions([members[j].type]); + } + } else { + substitution += types[i].pullSymbolIDString + "#"; + } + } } return substitution; @@ -35338,6 +35470,7 @@ var TypeScript; this.genericASTResolutionStack = []; this.resolvingTypeReference = false; this.resolvingNamespaceMemberAccess = false; + this.resolvingTypeQueryExpression = false; this.resolveAggressively = false; this.canUseTypeSymbol = false; this.specializingToAny = false; @@ -35722,7 +35855,7 @@ var TypeScript; this._cachedRegExpInterfaceType = this.getSymbolFromDeclPath("RegExp", [], 16 /* Interface */); } - if (!this._cachedRegExpInterfaceType.isResolved) { + if (this._cachedRegExpInterfaceType && !this._cachedRegExpInterfaceType.isResolved) { this.resolveDeclaredSymbol(this._cachedRegExpInterfaceType, null, new TypeScript.PullTypeResolutionContext()); } @@ -36483,11 +36616,7 @@ var TypeScript; this.validateVariableDeclarationGroups(containerDecl, context); } - if (!context.isInBaseTypeResolution()) { - containerSymbol.setResolved(); - } else { - containerSymbol.inResolution = false; - } + containerSymbol.setResolved(); return containerSymbol; }; @@ -36511,6 +36640,7 @@ var TypeScript; }; PullTypeResolver.prototype.resolveReferenceTypeDeclaration = function (typeDeclAST, context) { + var _this = this; var typeDecl = this.getDeclForAST(typeDeclAST); var enclosingDecl = this.getEnclosingDecl(typeDecl); var typeDeclSymbol = typeDecl.getSymbol(); @@ -36608,6 +36738,11 @@ var TypeScript; if (wasInBaseTypeResolution) { typeDeclSymbol.inResolution = false; + + PullTypeResolver.typeCheckCallBacks.push(function () { + _this.resolveDeclaredSymbol(typeDeclSymbol, enclosingDecl, context); + }); + return typeDeclSymbol; } @@ -37161,6 +37296,11 @@ var TypeScript; if (funcDeclAST.returnTypeAnnotation) { var returnTypeSymbol = this.resolveTypeReference(funcDeclAST.returnTypeAnnotation, functionDecl, context); + if (this.genericTypeIsUsedWithoutRequiredTypeArguments(returnTypeSymbol, funcDeclAST.returnTypeAnnotation, context)) { + context.postError(this.unitPath, funcDeclAST.returnTypeAnnotation.minChar, funcDeclAST.returnTypeAnnotation.getLength(), TypeScript.DiagnosticCode.Generic_type_references_must_include_all_type_arguments, null, functionDecl); + returnTypeSymbol = this.specializeTypeToAny(returnTypeSymbol, functionDecl, context); + } + signature.returnType = returnTypeSymbol; if (this.isTypeArgumentOrWrapper(returnTypeSymbol)) { @@ -37414,7 +37554,10 @@ var TypeScript; var savedResolvingTypeReference = context.resolvingTypeReference; context.resolvingTypeReference = false; + var savedResolvingTypeQueryExpression = context.resolvingTypeQueryExpression; + context.resolvingTypeQueryExpression = true; var valueSymbol = this.resolveAST(typeQueryTerm, false, enclosingDecl, context); + context.resolvingTypeQueryExpression = savedResolvingTypeQueryExpression; context.resolvingTypeReference = savedResolvingTypeReference; if (valueSymbol && valueSymbol.isAlias()) { @@ -37653,13 +37796,25 @@ var TypeScript; if (!(varDecl.typeExpr || varDecl.init)) { var defaultType = this.semanticInfoChain.anyTypeSymbol; - if (this.compilationSettings.noImplicitAny && ((varDecl.getVarFlags() & 16384 /* ForInVariable */) === 0)) { - if (wrapperDecl.kind == 16384 /* Function */ || wrapperDecl.kind == 65536 /* Method */ || wrapperDecl.kind == 32768 /* ConstructorMethod */ || wrapperDecl.kind == 2097152 /* ConstructSignature */) { + if (this.compilationSettings.noImplicitAny && !TypeScript.hasFlag(varDecl.getVarFlags(), 16384 /* ForInVariable */)) { + if ((wrapperDecl.kind === 16384 /* Function */ || wrapperDecl.kind === 32768 /* ConstructorMethod */ || wrapperDecl.kind === 2097152 /* ConstructSignature */)) { context.postError(this.unitPath, varDecl.minChar, varDecl.getLength(), TypeScript.DiagnosticCode.Parameter_0_of_1_implicitly_has_an_any_type, [varDecl.id.actualText, enclosingDecl.name], enclosingDecl); - } else if (wrapperDecl.kind == 8388608 /* ObjectType */) { + } else if (wrapperDecl.kind === 65536 /* Method */) { + var parentDecl = wrapperDecl.getParentDecl(); + + if (!TypeScript.hasFlag(parentDecl.flags, 8 /* Ambient */)) { + context.postError(this.unitPath, varDecl.minChar, varDecl.getLength(), TypeScript.DiagnosticCode.Parameter_0_of_1_implicitly_has_an_any_type, [varDecl.id.actualText, enclosingDecl.name], enclosingDecl); + } else if (TypeScript.hasFlag(parentDecl.flags, 8 /* Ambient */) && !TypeScript.hasFlag(wrapperDecl.flags, 2 /* Private */)) { + context.postError(this.unitPath, varDecl.minChar, varDecl.getLength(), TypeScript.DiagnosticCode.Parameter_0_of_1_implicitly_has_an_any_type, [varDecl.id.actualText, enclosingDecl.name], enclosingDecl); + } + } else if (wrapperDecl.kind === 8388608 /* ObjectType */) { context.postError(this.unitPath, varDecl.minChar, varDecl.getLength(), TypeScript.DiagnosticCode.Member_0_of_object_type_implicitly_has_an_any_type, [varDecl.id.actualText], enclosingDecl); - } else if (wrapperDecl.kind != 1073741824 /* CatchBlock */) { - context.postError(this.unitPath, varDecl.minChar, varDecl.getLength(), TypeScript.DiagnosticCode.Variable_0_implicitly_has_an_any_type, [varDecl.id.actualText], enclosingDecl); + } else if (wrapperDecl.kind !== 1073741824 /* CatchBlock */) { + if (!TypeScript.hasFlag(wrapperDecl.flags, 8 /* Ambient */)) { + context.postError(this.unitPath, varDecl.minChar, varDecl.getLength(), TypeScript.DiagnosticCode.Variable_0_implicitly_has_an_any_type, [varDecl.id.actualText], enclosingDecl); + } else if (TypeScript.hasFlag(wrapperDecl.flags, 8 /* Ambient */) && !TypeScript.hasFlag(varDecl.getVarFlags(), 2 /* Private */)) { + context.postError(this.unitPath, varDecl.minChar, varDecl.getLength(), TypeScript.DiagnosticCode.Variable_0_implicitly_has_an_any_type, [varDecl.id.actualText], enclosingDecl); + } } } @@ -37889,6 +38044,10 @@ var TypeScript; } } + if (!functionSymbol.type && functionSymbol.isAccessor()) { + functionSymbol.type = signature.returnType; + } + if (this.isTypeArgumentOrWrapper(returnType) && functionSymbol) { functionSymbol.type.setHasGenericSignature(); } @@ -37896,8 +38055,121 @@ var TypeScript; } }; - PullTypeResolver.prototype.resolveFunctionDeclaration = function (funcDeclAST, context) { + PullTypeResolver.prototype.typeCheckFunctionDeclaration = function (funcDeclAST, funcDecl, signature, context) { var _this = this; + if (context.inTypeCheck && (!context.inSpecialization || !signature.isGeneric())) { + PullTypeResolver.typeCheckCallBacks.push(function () { + if (signature.hasBeenChecked || signature.getRootSymbol() != signature) { + return; + } + + var currentUnitPath = _this.unitPath; + _this.setUnitPath(funcDecl.getScriptName()); + var prevSeenSuperConstructorCall = _this.seenSuperConstructorCall; + _this.seenSuperConstructorCall = false; + + _this.resolveAST(funcDeclAST.block, false, funcDecl, context); + + _this.validateVariableDeclarationGroups(funcDecl, context); + + var enclosingDecl = _this.getEnclosingDecl(funcDecl); + + var hasReturn = (funcDecl.flags & (2048 /* Signature */ | 4194304 /* HasReturnStatement */)) != 0; + + var parameters = signature.parameters; + + if (funcDeclAST.isConstructor || TypeScript.hasFlag(funcDeclAST.getFunctionFlags(), 1024 /* ConstructMember */)) { + if (funcDecl.getSignatureSymbol() && funcDecl.getSignatureSymbol().isDefinition() && _this.enclosingClassIsDerived(funcDecl)) { + if (!_this.seenSuperConstructorCall) { + context.postError(_this.unitPath, funcDeclAST.minChar, 11, TypeScript.DiagnosticCode.Constructors_for_derived_classes_must_contain_a_super_call, null, enclosingDecl); + } else if (_this.superCallMustBeFirstStatementInConstructor(funcDecl, enclosingDecl)) { + var firstStatement = _this.getFirstStatementFromFunctionDeclAST(funcDeclAST); + if (!firstStatement || !_this.isSuperCallNode(firstStatement)) { + context.postError(_this.unitPath, funcDeclAST.minChar, 11, TypeScript.DiagnosticCode.A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties, null, enclosingDecl); + } + } + } + _this.typeCheckFunctionOverloads(funcDeclAST, context); + } else if (TypeScript.hasFlag(funcDeclAST.getFunctionFlags(), 4096 /* IndexerMember */)) { + var allIndexSignatures = enclosingDecl.getSymbol().type.getIndexSignatures(); + + for (var i = 0; i < allIndexSignatures.length; i++) { + if (!allIndexSignatures[i].isResolved) { + _this.resolveDeclaredSymbol(allIndexSignatures[i], allIndexSignatures[i].getDeclarations()[0].getParentDecl(), context); + } + + if (allIndexSignatures[i].parameters[0].type !== parameters[0].type) { + var stringIndexSignature = null; + var numberIndexSignature = null; + + var indexSignature = signature; + + var isNumericIndexer = parameters[0].type === _this.semanticInfoChain.numberTypeSymbol; + + if (isNumericIndexer) { + numberIndexSignature = indexSignature; + stringIndexSignature = allIndexSignatures[i]; + } else { + numberIndexSignature = allIndexSignatures[i]; + stringIndexSignature = indexSignature; + + if (enclosingDecl.getSymbol() === numberIndexSignature.getDeclarations()[0].getParentDecl().getSymbol()) { + break; + } + } + var comparisonInfo = new TypeComparisonInfo(); + var resolutionContext = new TypeScript.PullTypeResolutionContext(); + if (!_this.sourceIsSubtypeOfTarget(numberIndexSignature.returnType, stringIndexSignature.returnType, resolutionContext, comparisonInfo)) { + if (comparisonInfo.message) { + context.postError(_this.unitPath, funcDeclAST.minChar, funcDeclAST.getLength(), TypeScript.DiagnosticCode.Numeric_indexer_type_0_must_be_a_subtype_of_string_indexer_type_1_NL_2, [numberIndexSignature.returnType.toString(), stringIndexSignature.returnType.toString(), comparisonInfo.message], enclosingDecl); + } else { + context.postError(_this.unitPath, funcDeclAST.minChar, funcDeclAST.getLength(), TypeScript.DiagnosticCode.Numeric_indexer_type_0_must_be_a_subtype_of_string_indexer_type_1, [numberIndexSignature.returnType.toString(), stringIndexSignature.returnType.toString()], enclosingDecl); + } + } + break; + } + } + + var allMembers = enclosingDecl.getSymbol().type.getAllMembers(TypeScript.PullElementKind.All, true); + for (var i = 0; i < allMembers.length; i++) { + var name = allMembers[i].name; + if (name) { + if (!allMembers[i].isResolved) { + _this.resolveDeclaredSymbol(allMembers[i], allMembers[i].getDeclarations()[0].getParentDecl(), context); + } + + if (enclosingDecl.getSymbol() !== allMembers[i].getContainer()) { + var isMemberNumeric = isFinite(+name); + if (isNumericIndexer === isMemberNumeric) { + _this.checkThatMemberIsSubtypeOfIndexer(allMembers[i], indexSignature, funcDeclAST, context, enclosingDecl, isNumericIndexer); + } + } + } + } + } else { + if (funcDeclAST.block && funcDeclAST.returnTypeAnnotation != null && !hasReturn) { + var isVoidOrAny = _this.isAnyOrEquivalent(signature.returnType) || signature.returnType === _this.semanticInfoChain.voidTypeSymbol; + + if (!isVoidOrAny && !(funcDeclAST.block.statements.members.length > 0 && funcDeclAST.block.statements.members[0].nodeType() === 96 /* ThrowStatement */)) { + var funcName = funcDecl.getDisplayName(); + funcName = funcName ? funcName : "expression"; + + context.postError(_this.unitPath, funcDeclAST.returnTypeAnnotation.minChar, funcDeclAST.returnTypeAnnotation.getLength(), TypeScript.DiagnosticCode.Function_0_declared_a_non_void_return_type_but_has_no_return_expression, [funcName], enclosingDecl); + } + } + _this.typeCheckFunctionOverloads(funcDeclAST, context); + } + + _this.checkFunctionTypePrivacy(funcDeclAST, false, context); + _this.seenSuperConstructorCall = prevSeenSuperConstructorCall; + + signature.hasBeenChecked = true; + _this.setUnitPath(currentUnitPath); + }); + } + }; + + PullTypeResolver.prototype.resolveFunctionDeclaration = function (funcDeclAST, context) { var funcDecl = this.getDeclForAST(funcDeclAST); var funcSymbol = funcDecl.getSymbol(); @@ -37910,6 +38182,7 @@ var TypeScript; if (signature) { if (signature.isResolved) { + this.typeCheckFunctionDeclaration(funcDeclAST, funcDecl, signature, context); return funcSymbol; } @@ -38009,6 +38282,11 @@ var TypeScript; } } + if (this.genericTypeIsUsedWithoutRequiredTypeArguments(returnTypeSymbol, funcDeclAST.returnTypeAnnotation, context)) { + context.postError(this.unitPath, funcDeclAST.returnTypeAnnotation.minChar, funcDeclAST.returnTypeAnnotation.getLength(), TypeScript.DiagnosticCode.Generic_type_references_must_include_all_type_arguments, null, funcDecl); + returnTypeSymbol = this.specializeTypeToAny(returnTypeSymbol, funcDecl, context); + } + signature.returnType = returnTypeSymbol; if (isConstructor && returnTypeSymbol === this.semanticInfoChain.voidTypeSymbol) { @@ -38018,8 +38296,13 @@ var TypeScript; } else if (!funcDeclAST.isConstructor && !funcDeclAST.isConstructMember()) { if (funcDeclAST.isSignature()) { signature.returnType = this.semanticInfoChain.anyTypeSymbol; + var parentDeclFlags = 0 /* None */; + if (TypeScript.hasFlag(funcDecl.kind, 65536 /* Method */) || TypeScript.hasFlag(funcDecl.kind, 32768 /* ConstructorMethod */)) { + var parentDecl = funcDecl.getParentDecl(); + parentDeclFlags = parentDecl.flags; + } - if (this.compilationSettings.noImplicitAny) { + if (this.compilationSettings.noImplicitAny && (!TypeScript.hasFlag(parentDeclFlags, 8 /* Ambient */) || (TypeScript.hasFlag(parentDeclFlags, 8 /* Ambient */) && !TypeScript.hasFlag(funcDecl.flags, 2 /* Private */)))) { var funcDeclASTName = funcDeclAST.name; if (funcDeclASTName) { context.postError(this.unitPath, funcDeclAST.minChar, funcDeclAST.getLength(), TypeScript.DiagnosticCode._0_which_lacks_return_type_annotation_implicitly_has_an_any_return_type, [funcDeclASTName.actualText], funcDecl); @@ -38051,116 +38334,7 @@ var TypeScript; } } - if (context.inTypeCheck && (!context.inSpecialization || !signature.isGeneric())) { - var prevSeenSuperConstructorCall = this.seenSuperConstructorCall; - - PullTypeResolver.typeCheckCallBacks.push(function () { - if (signature.hasBeenChecked) { - return; - } - - _this.setUnitPath(funcDecl.getScriptName()); - _this.seenSuperConstructorCall = false; - - _this.resolveAST(funcDeclAST.block, false, funcDecl, context); - - _this.validateVariableDeclarationGroups(funcDecl, context); - - var enclosingDecl = _this.getEnclosingDecl(funcDecl); - - var hasReturn = (funcDecl.flags & (2048 /* Signature */ | 4194304 /* HasReturnStatement */)) != 0; - - var parameters = signature.parameters; - - if (funcDeclAST.isConstructor || TypeScript.hasFlag(funcDeclAST.getFunctionFlags(), 1024 /* ConstructMember */)) { - if (funcDecl.getSignatureSymbol() && funcDecl.getSignatureSymbol().isDefinition() && _this.enclosingClassIsDerived(funcDecl)) { - if (!_this.seenSuperConstructorCall) { - context.postError(_this.unitPath, funcDeclAST.minChar, 11, TypeScript.DiagnosticCode.Constructors_for_derived_classes_must_contain_a_super_call, null, enclosingDecl); - } else if (_this.superCallMustBeFirstStatementInConstructor(funcDecl, enclosingDecl)) { - var firstStatement = _this.getFirstStatementFromFunctionDeclAST(funcDeclAST); - if (!firstStatement || !_this.isSuperCallNode(firstStatement)) { - context.postError(_this.unitPath, funcDeclAST.minChar, 11, TypeScript.DiagnosticCode.A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties, null, enclosingDecl); - } - } - } - _this.typeCheckFunctionOverloads(funcDeclAST, context); - } else if (TypeScript.hasFlag(funcDeclAST.getFunctionFlags(), 4096 /* IndexerMember */)) { - var allIndexSignatures = enclosingDecl.getSymbol().type.getIndexSignatures(); - - for (var i = 0; i < allIndexSignatures.length; i++) { - if (!allIndexSignatures[i].isResolved) { - _this.resolveDeclaredSymbol(allIndexSignatures[i], allIndexSignatures[i].getDeclarations()[0].getParentDecl(), context); - } - - if (allIndexSignatures[i].parameters[0].type !== parameters[0].type) { - var stringIndexSignature = null; - var numberIndexSignature = null; - - var indexSignature = signature; - - var isNumericIndexer = parameters[0].type === _this.semanticInfoChain.numberTypeSymbol; - - if (isNumericIndexer) { - numberIndexSignature = indexSignature; - stringIndexSignature = allIndexSignatures[i]; - } else { - numberIndexSignature = allIndexSignatures[i]; - stringIndexSignature = indexSignature; - - if (enclosingDecl.getSymbol() === numberIndexSignature.getDeclarations()[0].getParentDecl().getSymbol()) { - break; - } - } - var comparisonInfo = new TypeComparisonInfo(); - var resolutionContext = new TypeScript.PullTypeResolutionContext(); - if (!_this.sourceIsSubtypeOfTarget(numberIndexSignature.returnType, stringIndexSignature.returnType, resolutionContext, comparisonInfo)) { - if (comparisonInfo.message) { - context.postError(_this.unitPath, funcDeclAST.minChar, funcDeclAST.getLength(), TypeScript.DiagnosticCode.Numeric_indexer_type_0_must_be_a_subtype_of_string_indexer_type_1_NL_2, [numberIndexSignature.returnType.toString(), stringIndexSignature.returnType.toString(), comparisonInfo.message], enclosingDecl); - } else { - context.postError(_this.unitPath, funcDeclAST.minChar, funcDeclAST.getLength(), TypeScript.DiagnosticCode.Numeric_indexer_type_0_must_be_a_subtype_of_string_indexer_type_1, [numberIndexSignature.returnType.toString(), stringIndexSignature.returnType.toString()], enclosingDecl); - } - } - break; - } - } - - var allMembers = enclosingDecl.getSymbol().type.getAllMembers(TypeScript.PullElementKind.All, true); - for (var i = 0; i < allMembers.length; i++) { - var name = allMembers[i].name; - if (name) { - if (!allMembers[i].isResolved) { - _this.resolveDeclaredSymbol(allMembers[i], allMembers[i].getDeclarations()[0].getParentDecl(), context); - } - - if (enclosingDecl.getSymbol() !== allMembers[i].getContainer()) { - var isMemberNumeric = isFinite(+name); - if (isNumericIndexer === isMemberNumeric) { - _this.checkThatMemberIsSubtypeOfIndexer(allMembers[i], indexSignature, funcDeclAST, context, enclosingDecl, isNumericIndexer); - } - } - } - } - } else { - if (funcDeclAST.block && funcDeclAST.returnTypeAnnotation != null && !hasReturn) { - var isVoidOrAny = _this.isAnyOrEquivalent(returnTypeSymbol) || returnTypeSymbol === _this.semanticInfoChain.voidTypeSymbol; - - if (!isVoidOrAny && !(funcDeclAST.block.statements.members.length > 0 && funcDeclAST.block.statements.members[0].nodeType() === 96 /* ThrowStatement */)) { - var funcName = funcDecl.getDisplayName(); - funcName = funcName ? funcName : "expression"; - - context.postError(_this.unitPath, funcDeclAST.returnTypeAnnotation.minChar, funcDeclAST.returnTypeAnnotation.getLength(), TypeScript.DiagnosticCode.Function_0_declared_a_non_void_return_type_but_has_no_return_expression, [funcName], enclosingDecl); - } - } - _this.typeCheckFunctionOverloads(funcDeclAST, context); - } - - _this.checkFunctionTypePrivacy(funcDeclAST, false, context); - _this.seenSuperConstructorCall = prevSeenSuperConstructorCall; - - signature.hasBeenChecked = true; - }); - } - + this.typeCheckFunctionDeclaration(funcDeclAST, funcDecl, signature, context); return funcSymbol; }; @@ -38178,6 +38352,9 @@ var TypeScript; if (signature) { if (signature.isResolved) { + if (!accessorSymbol.type) { + accessorSymbol.type = signature.returnType; + } return accessorSymbol; } @@ -38185,6 +38362,10 @@ var TypeScript; signature.returnType = this.semanticInfoChain.anyTypeSymbol; signature.setResolved(); + if (!accessorSymbol.type) { + accessorSymbol.type = signature.returnType; + } + return accessorSymbol; } @@ -38219,6 +38400,11 @@ var TypeScript; } } + if (this.genericTypeIsUsedWithoutRequiredTypeArguments(returnTypeSymbol, funcDeclAST.returnTypeAnnotation, context)) { + context.postError(this.unitPath, funcDeclAST.returnTypeAnnotation.minChar, funcDeclAST.returnTypeAnnotation.getLength(), TypeScript.DiagnosticCode.Generic_type_references_must_include_all_type_arguments, null, funcDecl); + returnTypeSymbol = this.specializeTypeToAny(returnTypeSymbol, funcDecl, context); + } + signature.returnType = returnTypeSymbol; } } else { @@ -39277,7 +39463,7 @@ var TypeScript; this.resolveDeclaredSymbol(nameSymbol, enclosingDecl, context); } - if (nameSymbol && (nameSymbol.type != this.semanticInfoChain.anyTypeSymbol || nameSymbol.hasFlag(16777216 /* IsAnnotatedWithAny */))) { + if (nameSymbol && (nameSymbol.type != this.semanticInfoChain.anyTypeSymbol || nameSymbol.hasFlag(16777216 /* IsAnnotatedWithAny */ | 1 /* Exported */))) { this.setSymbolForAST(nameAST, nameSymbol, context); } @@ -39327,7 +39513,9 @@ var TypeScript; if (nameSymbol.isType() && nameSymbol.isAlias()) { aliasSymbol = nameSymbol; - aliasSymbol.isUsedAsValue = true; + if (!context.resolvingTypeQueryExpression) { + aliasSymbol.isUsedAsValue = true; + } if (!nameSymbol.isResolved) { this.resolveDeclaredSymbol(nameSymbol, enclosingDecl, context); @@ -39414,7 +39602,9 @@ var TypeScript; var lhsType = lhs.type; if (lhs.isAlias()) { - (lhs).isUsedAsValue = true; + if (!context.resolvingTypeQueryExpression) { + (lhs).isUsedAsValue = true; + } lhsType = (lhs).getExportAssignedTypeSymbol(); } @@ -39571,6 +39761,14 @@ var TypeScript; return this.semanticInfoChain.stringTypeSymbol; } else if (id === "number") { return this.semanticInfoChain.numberTypeSymbol; + } else if (id === "bool") { + if (!this.compilationSettings.allowBool && !this.currentUnit.getProperties().unitContainsBool) { + this.currentUnit.getProperties().unitContainsBool = true; + context.postError(this.unitPath, nameAST.minChar, nameAST.getLength(), TypeScript.DiagnosticCode.Use_of_deprecated_type_bool_Use_boolean_instead, null, enclosingDecl); + return this.semanticInfoChain.booleanTypeSymbol; + } else { + return this.semanticInfoChain.booleanTypeSymbol; + } } else if (id === "boolean") { return this.semanticInfoChain.booleanTypeSymbol; } else if (id === "void") { @@ -39667,6 +39865,10 @@ var TypeScript; } else { typeArgs[i] = typeArg; } + + if (typeArgs[i].isError()) { + typeArgs[i] = this.semanticInfoChain.anyTypeSymbol; + } } } context.isResolvingClassExtendedType = savedIsResolvingClassExtendedType; @@ -39905,6 +40107,11 @@ var TypeScript; if (funcDeclAST.returnTypeAnnotation) { var returnTypeSymbol = this.resolveTypeReference(funcDeclAST.returnTypeAnnotation, functionDecl, context); + if (this.genericTypeIsUsedWithoutRequiredTypeArguments(returnTypeSymbol, funcDeclAST.returnTypeAnnotation, context)) { + context.postError(this.unitPath, funcDeclAST.returnTypeAnnotation.minChar, funcDeclAST.returnTypeAnnotation.getLength(), TypeScript.DiagnosticCode.Generic_type_references_must_include_all_type_arguments, null, functionDecl); + returnTypeSymbol = this.specializeTypeToAny(returnTypeSymbol, functionDecl, context); + } + signature.returnType = returnTypeSymbol; } else { if (assigningFunctionSignature) { @@ -39938,6 +40145,7 @@ var TypeScript; if (context.typeCheck()) { PullTypeResolver.typeCheckCallBacks.push(function () { + var currentUnitPath = _this.unitPath; _this.setUnitPath(functionDecl.getScriptName()); _this.seenSuperConstructorCall = false; @@ -39959,6 +40167,7 @@ var TypeScript; } _this.typeCheckFunctionOverloads(funcDeclAST, context); + _this.setUnitPath(currentUnitPath); }); } @@ -40415,6 +40624,7 @@ var TypeScript; PullTypeResolver.prototype.computeIndexExpressionSymbol = function (callEx, inContextuallyTypedAssignment, enclosingDecl, context) { var targetSymbol = this.resolveAST(callEx.operand1, inContextuallyTypedAssignment, enclosingDecl, context); + var indexType = this.resolveAST(callEx.operand2, inContextuallyTypedAssignment, enclosingDecl, context).type; var targetTypeSymbol = targetSymbol.type; @@ -40424,8 +40634,6 @@ var TypeScript; var elementType = targetTypeSymbol.getElementType(); - var indexType = this.resolveAST(callEx.operand2, inContextuallyTypedAssignment, enclosingDecl, context).type; - var isNumberIndex = indexType === this.semanticInfoChain.numberTypeSymbol || TypeScript.PullHelpers.symbolIsEnum(indexType); if (elementType && isNumberIndex) { @@ -40438,6 +40646,10 @@ var TypeScript; var member = this.getMemberSymbol(memberName, TypeScript.PullElementKind.SomeValue, targetTypeSymbol); if (member) { + if (!member.isResolved) { + this.resolveDeclaredSymbol(member, enclosingDecl, context); + } + return member.type; } } @@ -40462,10 +40674,10 @@ var TypeScript; if (paramSymbols.length) { paramType = paramSymbols[0].type; - if (paramType === this.semanticInfoChain.stringTypeSymbol) { + if (!stringSignature && paramType === this.semanticInfoChain.stringTypeSymbol) { stringSignature = signatures[i]; continue; - } else if (paramType === this.semanticInfoChain.numberTypeSymbol || paramType.kind === 64 /* Enum */) { + } else if (!numberSignature && (paramType === this.semanticInfoChain.numberTypeSymbol || paramType.kind === 64 /* Enum */)) { numberSignature = signatures[i]; continue; } @@ -40703,7 +40915,6 @@ var TypeScript; PullTypeResolver.prototype.computeInvocationExpressionSymbol = function (callEx, inContextuallyTypedAssignment, enclosingDecl, context, additionalResults) { var targetSymbol = this.resolveAST(callEx.target, inContextuallyTypedAssignment, enclosingDecl, context); - var targetAST = this.getLastIdentifierInTarget(callEx); var targetTypeSymbol = targetSymbol.type; @@ -40729,6 +40940,7 @@ var TypeScript; targetTypeSymbol = targetSymbol.type; } else { context.postError(this.unitPath, targetAST.minChar, targetAST.getLength(), TypeScript.DiagnosticCode.Calls_to_super_are_only_valid_inside_a_class, null, enclosingDecl); + this.resolveAST(callEx.arguments, inContextuallyTypedAssignment, enclosingDecl, context); return this.getNewErrorTypeSymbol(null); } @@ -40879,6 +41091,15 @@ var TypeScript; additionalResults.actualParametersContextTypeSymbols = actualParametersContextTypeSymbols; } + var prevIsResolvingSuperConstructorTarget = context.isResolvingSuperConstructorTarget; + if (isSuperCall) { + context.isResolvingSuperConstructorTarget = true; + } + this.resolveAST(callEx.arguments, inContextuallyTypedAssignment, enclosingDecl, context); + if (isSuperCall) { + context.isResolvingSuperConstructorTarget = prevIsResolvingSuperConstructorTarget; + } + if (!couldNotFindGenericOverload) { if (this.cachedFunctionInterfaceType() && this.sourceIsSubtypeOfTarget(targetTypeSymbol, this.cachedFunctionInterfaceType(), context)) { return this.semanticInfoChain.anyTypeSymbol; @@ -41323,8 +41544,11 @@ var TypeScript; } return returnType; - } else if (targetTypeSymbol.isClass()) { - return returnType; + } else { + this.resolveAST(callEx.arguments, inContextuallyTypedAssignment, enclosingDecl, context); + if (targetTypeSymbol.isClass()) { + return returnType; + } } context.postError(this.unitPath, targetAST.minChar, targetAST.getLength(), TypeScript.DiagnosticCode.Invalid_new_expression, null, enclosingDecl); @@ -41803,6 +42027,10 @@ var TypeScript; return false; } + if (!!(s1.typeParameters && s1.typeParameters.length) != !!(s2.typeParameters && s2.typeParameters.length)) { + return false; + } + if (s1.typeParameters && s2.typeParameters && (s1.typeParameters.length != s2.typeParameters.length)) { return false; } @@ -41879,7 +42107,7 @@ var TypeScript; for (var j = 0; j < extendsList.members.length; j++) { extendsSymbol = this.semanticInfoChain.getSymbolForAST(extendsList.members[j], sourceDecls[i].getScriptName()); - if (extendsSymbol == target || this.sourceExtendsTarget(extendsSymbol, target, context)) { + if (extendsSymbol && (extendsSymbol == target || this.sourceExtendsTarget(extendsSymbol, target, context))) { return true; } } @@ -42681,6 +42909,11 @@ var TypeScript; typeB = actuals[i]; + if (typeB.isAlias()) { + (typeB).isUsedAsValue = true; + typeB = (typeB).getExportAssignedTypeSymbol(); + } + if (typeA && !typeA.isResolved) { this.resolveDeclaredSymbol(typeA, enclosingDecl, context); } @@ -43418,6 +43651,10 @@ var TypeScript; if (!typeSymbol.isNamedTypeSymbol()) { if (typeSymbol.inSymbolPrivacyCheck) { + var associatedContainerType = typeSymbol.getAssociatedContainerType(); + if (associatedContainerType && associatedContainerType.isNamedTypeSymbol()) { + this.checkSymbolPrivacy(declSymbol, associatedContainerType, context, privacyErrorReporter); + } return; } @@ -43441,18 +43678,17 @@ var TypeScript; if (declSymbol.isExternallyVisible()) { var symbolIsVisible = symbol.isExternallyVisible(); - if (symbolIsVisible) { + if (symbolIsVisible && symbol.kind != 2 /* Primitive */ && symbol.kind != 8192 /* TypeParameter */) { var symbolPath = symbol.pathToRoot(); - if (symbolPath.length && symbolPath[symbolPath.length - 1].kind === 32 /* DynamicModule */) { - var declSymbolPath = declSymbol.pathToRoot(); + var declSymbolPath = declSymbol.pathToRoot(); + if (symbolPath[symbolPath.length - 1].kind === 32 /* DynamicModule */ && declSymbolPath[declSymbolPath.length - 1].kind == 32 /* DynamicModule */) { var verifyAlias = false; - if (declSymbolPath.length) { - if (declSymbolPath[declSymbolPath.length - 1] != symbolPath[symbolPath.length - 1]) { + + if (declSymbolPath[declSymbolPath.length - 1] != symbolPath[symbolPath.length - 1]) { + verifyAlias = true; + } else if (symbolPath.length > 1 && symbolPath[symbolPath.length - 2].kind == 32 /* DynamicModule */) { + if (declSymbolPath.length < 2 || declSymbolPath[declSymbolPath.length - 2] != symbolPath[symbolPath.length - 2]) { verifyAlias = true; - } else if (symbolPath.length > 1 && symbolPath[symbolPath.length - 2].kind == 32 /* DynamicModule */) { - if (declSymbolPath.length < 2 || declSymbolPath[declSymbolPath.length - 2] != symbolPath[symbolPath.length - 2]) { - verifyAlias = true; - } } } @@ -43469,6 +43705,10 @@ var TypeScript; symbol = symbolPath[symbolPath.length - 1]; } } + } else if (symbol.kind == 256 /* TypeAlias */) { + var aliasSymbol = symbol; + symbolIsVisible = true; + aliasSymbol.typeUsedExternally = true; } if (!symbolIsVisible) { @@ -44069,7 +44309,7 @@ var TypeScript; var extendedConstructorTypeProp = extendedConstructorType.findMember(propName); if (extendedConstructorTypeProp) { if (!extendedConstructorTypeProp.isResolved) { - var extendedClassAst = this.currentUnit.getASTForSymbol(extendedType); + var extendedClassAst = this.currentUnit.getASTForDecl(extendedType.getDeclarations()[0]); var extendedClassDecl = this.currentUnit.getDeclForAST(extendedClassAst); this.resolveDeclaredSymbol(extendedConstructorTypeProp, extendedClassDecl, resolutionContext); } @@ -44159,7 +44399,10 @@ var TypeScript; var contextForBaseTypeResolution = new TypeScript.PullTypeResolutionContext(); contextForBaseTypeResolution.isResolvingClassExtendedType = true; + var prevResolvingTypeReference = context.resolvingTypeReference; + context.resolvingTypeReference = true; var baseType = this.resolveAST(baseDeclAST, false, enclosingDecl, context); + context.resolvingTypeReference = prevResolvingTypeReference; contextForBaseTypeResolution.isResolvingClassExtendedType = false; var typeDeclIsClass = typeSymbol.isClass(); @@ -44380,6 +44623,7 @@ var TypeScript; }); this.syntaxElementSymbolMap = new TypeScript.DataMap(); this.symbolSyntaxElementMap = new TypeScript.DataMap(); + this.properties = new SemanticInfoProperties(); this.hasBeenTypeChecked = false; this.compilationUnitPath = compilationUnitPath; } @@ -44515,10 +44759,22 @@ var TypeScript; TypeScript.getDiagnosticsFromEnclosingDecl(this.topLevelDecls[i], semanticErrors); } }; + + SemanticInfo.prototype.getProperties = function () { + return this.properties; + }; return SemanticInfo; })(); TypeScript.SemanticInfo = SemanticInfo; + var SemanticInfoProperties = (function () { + function SemanticInfoProperties() { + this.unitContainsBool = false; + } + return SemanticInfoProperties; + })(); + TypeScript.SemanticInfoProperties = SemanticInfoProperties; + var SemanticInfoChain = (function () { function SemanticInfoChain() { this.units = [new SemanticInfo("")]; @@ -46731,7 +46987,7 @@ var TypeScript; constructorTypeSymbol.addDeclaration(constructorTypeDeclaration); this.semanticInfo.setSymbolForAST(constructorTypeAST, constructorTypeSymbol); - var signature = new TypeScript.PullDefinitionSignatureSymbol(2097152 /* ConstructSignature */); + var signature = new TypeScript.PullSignatureSymbol(2097152 /* ConstructSignature */); if ((constructorTypeAST).variableArgList) { signature.hasVarArgs = true; @@ -47337,7 +47593,7 @@ var TypeScript; signature.addTypeParameter(typeParameter); } else { - var typeParameterAST = this.semanticInfoChain.getASTForDecl(typeParameterDecls[0]); + var typeParameterAST = this.semanticInfoChain.getASTForDecl(typeParameter.getDeclarations()[0]); functionTypeDeclaration.addDiagnostic(new TypeScript.Diagnostic(this.semanticInfo.getPath(), typeParameterAST.minChar, typeParameterAST.getLength(), TypeScript.DiagnosticCode.Duplicate_identifier_0, [typeParameter.name])); } @@ -48347,9 +48603,9 @@ var TypeScript; return true; } - if (moduleElement.kind() === 133 /* ImportDeclaration */) { + if (moduleElement.kind() === 134 /* ImportDeclaration */) { var importDecl = moduleElement; - if (importDecl.moduleReference.kind() === 245 /* ExternalModuleReference */) { + if (importDecl.moduleReference.kind() === 246 /* ExternalModuleReference */) { return true; } } @@ -48484,7 +48740,7 @@ var TypeScript; flags = flags | 1 /* Exported */; } - if (TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */)) { + if (TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */)) { flags = flags | 8 /* Ambient */; } @@ -48563,7 +48819,7 @@ var TypeScript; }; SyntaxTreeToAstVisitor.prototype.getModuleNamesHelper = function (name, result) { - if (name.kind() === 121 /* QualifiedName */) { + if (name.kind() === 122 /* QualifiedName */) { var qualifiedName = name; this.getModuleNamesHelper(qualifiedName.left, result); this.movePast(qualifiedName.dotToken); @@ -48620,7 +48876,7 @@ var TypeScript; }; SyntaxTreeToAstVisitor.prototype.completeModuleDeclaration = function (node, result) { - if (TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */)) { + if (TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */)) { result.setModuleFlags(result.getModuleFlags() | 8 /* Ambient */); } }; @@ -48670,7 +48926,7 @@ var TypeScript; flags = flags | 1 /* Exported */; } - if (TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */)) { + if (TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */)) { flags = flags | 8 /* Ambient */; } @@ -48764,8 +49020,8 @@ var TypeScript; if (TypeScript.Syntax.isIntegerLiteral(expression)) { var token; switch (expression.kind()) { - case 163 /* PlusExpression */: - case 164 /* NegateExpression */: + case 164 /* PlusExpression */: + case 165 /* NegateExpression */: token = (expression).operand; break; default: @@ -48773,7 +49029,7 @@ var TypeScript; } var value = token.value(); - return value && expression.kind() === 164 /* NegateExpression */ ? -value : value; + return value && expression.kind() === 165 /* NegateExpression */ ? -value : value; } else if (this.compilationSettings.propagateEnumConstants) { switch (expression.kind()) { case 11 /* IdentifierName */: @@ -48782,7 +49038,7 @@ var TypeScript; }); return variableDeclarator ? variableDeclarator.constantValue : null; - case 201 /* LeftShiftExpression */: + case 202 /* LeftShiftExpression */: var binaryExpression = expression; return this.computeConstantValue(binaryExpression.left, declarators) << this.computeConstantValue(binaryExpression.right, declarators); } @@ -48858,7 +49114,7 @@ var TypeScript; flags = flags | 1 /* Exported */; } - if (TypeScript.SyntaxUtilities.containsToken(node.modifiers, 63 /* DeclareKeyword */)) { + if (TypeScript.SyntaxUtilities.containsToken(node.modifiers, 64 /* DeclareKeyword */)) { flags = flags | 8 /* Ambient */; } @@ -48924,17 +49180,17 @@ var TypeScript; SyntaxTreeToAstVisitor.prototype.getUnaryExpressionNodeType = function (kind) { switch (kind) { - case 163 /* PlusExpression */: + case 164 /* PlusExpression */: return 27 /* PlusExpression */; - case 164 /* NegateExpression */: + case 165 /* NegateExpression */: return 28 /* NegateExpression */; - case 165 /* BitwiseNotExpression */: + case 166 /* BitwiseNotExpression */: return 73 /* BitwiseNotExpression */; - case 166 /* LogicalNotExpression */: + case 167 /* LogicalNotExpression */: return 74 /* LogicalNotExpression */; - case 167 /* PreIncrementExpression */: + case 168 /* PreIncrementExpression */: return 75 /* PreIncrementExpression */; - case 168 /* PreDecrementExpression */: + case 169 /* PreDecrementExpression */: return 76 /* PreDecrementExpression */; default: throw TypeScript.Errors.invalidOperation(); @@ -49000,7 +49256,7 @@ var TypeScript; }; SyntaxTreeToAstVisitor.prototype.getArrowFunctionStatements = function (body) { - if (body.kind() === 145 /* Block */) { + if (body.kind() === 146 /* Block */) { return body.accept(this); } else { var expression = body.accept(this); @@ -49297,7 +49553,7 @@ var TypeScript; var operand = node.operand.accept(this); this.movePast(node.operatorToken); - var result = new TypeScript.UnaryExpression(node.kind() === 209 /* PostIncrementExpression */ ? 77 /* PostIncrementExpression */ : 78 /* PostDecrementExpression */, operand, null); + var result = new TypeScript.UnaryExpression(node.kind() === 210 /* PostIncrementExpression */ ? 77 /* PostIncrementExpression */ : 78 /* PostDecrementExpression */, operand, null); this.setSpan(result, start, node); return result; @@ -49363,77 +49619,77 @@ var TypeScript; SyntaxTreeToAstVisitor.prototype.getBinaryExpressionNodeType = function (node) { switch (node.kind()) { - case 172 /* CommaExpression */: + case 173 /* CommaExpression */: return 26 /* CommaExpression */; - case 173 /* AssignmentExpression */: + case 174 /* AssignmentExpression */: return 39 /* AssignmentExpression */; - case 174 /* AddAssignmentExpression */: + case 175 /* AddAssignmentExpression */: return 40 /* AddAssignmentExpression */; - case 175 /* SubtractAssignmentExpression */: + case 176 /* SubtractAssignmentExpression */: return 41 /* SubtractAssignmentExpression */; - case 176 /* MultiplyAssignmentExpression */: + case 177 /* MultiplyAssignmentExpression */: return 43 /* MultiplyAssignmentExpression */; - case 177 /* DivideAssignmentExpression */: + case 178 /* DivideAssignmentExpression */: return 42 /* DivideAssignmentExpression */; - case 178 /* ModuloAssignmentExpression */: + case 179 /* ModuloAssignmentExpression */: return 44 /* ModuloAssignmentExpression */; - case 179 /* AndAssignmentExpression */: + case 180 /* AndAssignmentExpression */: return 45 /* AndAssignmentExpression */; - case 180 /* ExclusiveOrAssignmentExpression */: + case 181 /* ExclusiveOrAssignmentExpression */: return 46 /* ExclusiveOrAssignmentExpression */; - case 181 /* OrAssignmentExpression */: + case 182 /* OrAssignmentExpression */: return 47 /* OrAssignmentExpression */; - case 182 /* LeftShiftAssignmentExpression */: + case 183 /* LeftShiftAssignmentExpression */: return 48 /* LeftShiftAssignmentExpression */; - case 183 /* SignedRightShiftAssignmentExpression */: + case 184 /* SignedRightShiftAssignmentExpression */: return 49 /* SignedRightShiftAssignmentExpression */; - case 184 /* UnsignedRightShiftAssignmentExpression */: + case 185 /* UnsignedRightShiftAssignmentExpression */: return 50 /* UnsignedRightShiftAssignmentExpression */; - case 186 /* LogicalOrExpression */: + case 187 /* LogicalOrExpression */: return 52 /* LogicalOrExpression */; - case 187 /* LogicalAndExpression */: + case 188 /* LogicalAndExpression */: return 53 /* LogicalAndExpression */; - case 188 /* BitwiseOrExpression */: + case 189 /* BitwiseOrExpression */: return 54 /* BitwiseOrExpression */; - case 189 /* BitwiseExclusiveOrExpression */: + case 190 /* BitwiseExclusiveOrExpression */: return 55 /* BitwiseExclusiveOrExpression */; - case 190 /* BitwiseAndExpression */: + case 191 /* BitwiseAndExpression */: return 56 /* BitwiseAndExpression */; - case 191 /* EqualsWithTypeConversionExpression */: + case 192 /* EqualsWithTypeConversionExpression */: return 57 /* EqualsWithTypeConversionExpression */; - case 192 /* NotEqualsWithTypeConversionExpression */: + case 193 /* NotEqualsWithTypeConversionExpression */: return 58 /* NotEqualsWithTypeConversionExpression */; - case 193 /* EqualsExpression */: + case 194 /* EqualsExpression */: return 59 /* EqualsExpression */; - case 194 /* NotEqualsExpression */: + case 195 /* NotEqualsExpression */: return 60 /* NotEqualsExpression */; - case 195 /* LessThanExpression */: + case 196 /* LessThanExpression */: return 61 /* LessThanExpression */; - case 196 /* GreaterThanExpression */: + case 197 /* GreaterThanExpression */: return 63 /* GreaterThanExpression */; - case 197 /* LessThanOrEqualExpression */: + case 198 /* LessThanOrEqualExpression */: return 62 /* LessThanOrEqualExpression */; - case 198 /* GreaterThanOrEqualExpression */: + case 199 /* GreaterThanOrEqualExpression */: return 64 /* GreaterThanOrEqualExpression */; - case 199 /* InstanceOfExpression */: + case 200 /* InstanceOfExpression */: return 34 /* InstanceOfExpression */; - case 200 /* InExpression */: + case 201 /* InExpression */: return 32 /* InExpression */; - case 201 /* LeftShiftExpression */: + case 202 /* LeftShiftExpression */: return 70 /* LeftShiftExpression */; - case 202 /* SignedRightShiftExpression */: + case 203 /* SignedRightShiftExpression */: return 71 /* SignedRightShiftExpression */; - case 203 /* UnsignedRightShiftExpression */: + case 204 /* UnsignedRightShiftExpression */: return 72 /* UnsignedRightShiftExpression */; - case 204 /* MultiplyExpression */: + case 205 /* MultiplyExpression */: return 67 /* MultiplyExpression */; - case 205 /* DivideExpression */: + case 206 /* DivideExpression */: return 68 /* DivideExpression */; - case 206 /* ModuloExpression */: + case 207 /* ModuloExpression */: return 69 /* ModuloExpression */; - case 207 /* AddExpression */: + case 208 /* AddExpression */: return 65 /* AddExpression */; - case 208 /* SubtractExpression */: + case 209 /* SubtractExpression */: return 66 /* SubtractExpression */; } @@ -49842,7 +50098,7 @@ var TypeScript; var switchClause = node.switchClauses.childAt(i); var translated = switchClause.accept(this); - if (switchClause.kind() === 232 /* DefaultSwitchClause */) { + if (switchClause.kind() === 233 /* DefaultSwitchClause */) { defaultCase = translated; } @@ -51304,14 +51560,6 @@ var TypeScript; return null; }; - TypeScriptCompiler.prototype.convertToDirectoryPath = function (dirPath) { - if (dirPath && dirPath.charAt(dirPath.length - 1) !== "/") { - dirPath += "/"; - } - - return dirPath; - }; - TypeScriptCompiler.prototype.setEmitOptions = function (ioHost) { this.emitOptions.ioHost = ioHost; @@ -51331,8 +51579,8 @@ var TypeScript; } } - this.emitOptions.compilationSettings.mapRoot = this.convertToDirectoryPath(TypeScript.switchToForwardSlashes(this.emitOptions.compilationSettings.mapRoot)); - this.emitOptions.compilationSettings.sourceRoot = this.convertToDirectoryPath(TypeScript.switchToForwardSlashes(this.emitOptions.compilationSettings.sourceRoot)); + this.emitOptions.compilationSettings.mapRoot = TypeScript.convertToDirectoryPath(TypeScript.switchToForwardSlashes(this.emitOptions.compilationSettings.mapRoot)); + this.emitOptions.compilationSettings.sourceRoot = TypeScript.convertToDirectoryPath(TypeScript.switchToForwardSlashes(this.emitOptions.compilationSettings.sourceRoot)); if (!this.emitOptions.compilationSettings.outFileOption && !this.emitOptions.compilationSettings.outDirOption && !this.emitOptions.compilationSettings.mapRoot && !this.emitOptions.compilationSettings.sourceRoot) { this.emitOptions.outputMany = true; @@ -51349,7 +51597,7 @@ var TypeScript; if (this.emitOptions.compilationSettings.outDirOption) { this.emitOptions.compilationSettings.outDirOption = TypeScript.switchToForwardSlashes(this.emitOptions.ioHost.resolvePath(this.emitOptions.compilationSettings.outDirOption)); - this.emitOptions.compilationSettings.outDirOption = this.convertToDirectoryPath(this.emitOptions.compilationSettings.outDirOption); + this.emitOptions.compilationSettings.outDirOption = TypeScript.convertToDirectoryPath(this.emitOptions.compilationSettings.outDirOption); } if (this.emitOptions.compilationSettings.outDirOption || this.emitOptions.compilationSettings.mapRoot || this.emitOptions.compilationSettings.sourceRoot) { From e79b35ad8ba318eeea0d7eb383014c0216a22047 Mon Sep 17 00:00:00 2001 From: Jed Hunsaker Date: Sat, 24 Aug 2013 16:55:32 -0700 Subject: [PATCH 10/12] Fix sinon-chai to match recent chai updates --- chai/chai.d.ts | 4 ++++ sinon-chai/sinon-chai-tests.ts | 18 +++++++------- sinon-chai/sinon-chai.d.ts | 44 ++++++++++++++++------------------ 3 files changed, 35 insertions(+), 31 deletions(-) diff --git a/chai/chai.d.ts b/chai/chai.d.ts index f061857d4..070765e00 100644 --- a/chai/chai.d.ts +++ b/chai/chai.d.ts @@ -8,6 +8,10 @@ declare module chai { function expect(target: any): Expect; + interface ExpectStatic { + (target: any): Expect; + } + interface Expect extends LanguageChains, NumericComparison, TypeComparison { not: Expect; deep: Deep; diff --git a/sinon-chai/sinon-chai-tests.ts b/sinon-chai/sinon-chai-tests.ts index e4de0f5a4..4f4e4712f 100644 --- a/sinon-chai/sinon-chai-tests.ts +++ b/sinon-chai/sinon-chai-tests.ts @@ -1,11 +1,11 @@ /// /// -var expect = chai.expect; +declare var expect: chai.ExpectStatic; function test() { - var spy; - var anotherSpy; + var spy: Function; + var anotherSpy: Function; var context; var match; @@ -15,6 +15,8 @@ function test() { expect(spy).to.have.been.calledThrice; expect(spy).to.have.been.calledBefore(anotherSpy); expect(spy).to.have.been.calledAfter(anotherSpy); + expect(spy).to.have.been.calledWithNew; + expect(spy).to.have.been.alwaysCalledWithNew; expect(spy).to.have.been.calledOn(context); expect(spy).to.have.been.alwaysCalledOn(context); expect(spy).to.have.been.calledWith('foo', 'bar'); @@ -23,8 +25,8 @@ function test() { expect(spy).to.have.been.alwaysCalledWithExactly('foo', 'bar'); expect(spy).to.have.been.calledWithMatch(match); expect(spy).to.have.been.alwaysCalledWithMatch(match); - expect(spy).to.have.been.returned(1); - expect(spy).to.have.been.alwaysReturned(1); - expect(spy).to.have.been.threw('an error'); - expect(spy).to.have.been.alwaysThrew('an error'); -} \ No newline at end of file + expect(spy).to.have.returned(1); + expect(spy).to.have.alwaysReturned(1); + expect(spy).threw('an error'); + expect(spy).alwaysThrew('an error'); +} diff --git a/sinon-chai/sinon-chai.d.ts b/sinon-chai/sinon-chai.d.ts index b74734751..273eb23b3 100644 --- a/sinon-chai/sinon-chai.d.ts +++ b/sinon-chai/sinon-chai.d.ts @@ -6,28 +6,26 @@ /// declare module chai { - interface Been { - called: boolean; - calledOnce: boolean; - calledTwice: boolean; - calledThrice: boolean; - calledBefore(spy: any): boolean; - calledAfter(spy: any): boolean; - calledOn(context: any): boolean; - alwaysCalledOn(context: any): boolean; - calledWith(...args: any[]): boolean; - alwaysCalledWith(...args: any[]): boolean; - calledWithExactly(...args: any[]): boolean; - alwaysCalledWithExactly(...args: any[]): boolean; - calledWithMatch(...args: any[]): boolean; - alwaysCalledWithMatch(...args: any[]): boolean; - returned(returnVal: any): boolean; - alwaysReturned(returnVal: any): boolean; - threw(errorObjOrErrorTypeStringOrNothing: any): boolean; - alwaysThrew(errorObjOrErrorTypeStringOrNothing: any): boolean; - } - - interface Have { - been: Been; + interface Expect { + called: Expect; + calledOnce: Expect; + calledTwice: Expect; + calledThrice: Expect; + calledBefore(spy: Function): Expect; + calledAfter(spy: Function): Expect; + calledWithNew: Expect; + alwaysCalledWithNew: Expect; + calledOn(context: any): Expect; + alwaysCalledOn(context: any): Expect; + calledWith(...args: any[]): Expect; + alwaysCalledWith(...args: any[]): Expect; + calledWithExactly(...args: any[]): Expect; + alwaysCalledWithExactly(...args: any[]): Expect; + calledWithMatch(...args: any[]): Expect; + alwaysCalledWithMatch(...args: any[]): Expect; + returned(returnVal: any): Expect; + alwaysReturned(returnVal: any): Expect; + threw(errorObjOrErrorTypeStringOrNothing: any): Expect; + alwaysThrew(errorObjOrErrorTypeStringOrNothing: any): Expect; } } From f782f465375ce651c6198e6676598212917506b6 Mon Sep 17 00:00:00 2001 From: Diullei Date: Sat, 24 Aug 2013 22:29:08 -0300 Subject: [PATCH 11/12] update runner.ts version --- _infrastructure/tests/runner.js | 2216 +++++++++++++++---------------- _infrastructure/tests/runner.ts | 4 +- 2 files changed, 1110 insertions(+), 1110 deletions(-) diff --git a/_infrastructure/tests/runner.js b/_infrastructure/tests/runner.js index 2999c057f..502b15e93 100644 --- a/_infrastructure/tests/runner.js +++ b/_infrastructure/tests/runner.js @@ -1,1108 +1,1108 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -var ExecResult = (function () { - function ExecResult() { - this.stdout = ""; - this.stderr = ""; - } - return ExecResult; -})(); - -var WindowsScriptHostExec = (function () { - function WindowsScriptHostExec() { - } - WindowsScriptHostExec.prototype.exec = function (filename, cmdLineArgs, handleResult) { - var result = new ExecResult(); - var shell = new ActiveXObject('WScript.Shell'); - try { - var process = shell.Exec(filename + ' ' + cmdLineArgs.join(' ')); - } catch (e) { - result.stderr = e.message; - result.exitCode = 1; - handleResult(result); - return; - } - - while (process.Status != 0) { - } - - result.exitCode = process.ExitCode; - if (!process.StdOut.AtEndOfStream) - result.stdout = process.StdOut.ReadAll(); - if (!process.StdErr.AtEndOfStream) - result.stderr = process.StdErr.ReadAll(); - - handleResult(result); - }; - return WindowsScriptHostExec; -})(); - -var NodeExec = (function () { - function NodeExec() { - } - NodeExec.prototype.exec = function (filename, cmdLineArgs, handleResult) { - var nodeExec = require('child_process').exec; - - var result = new ExecResult(); - result.exitCode = null; - var cmdLine = filename + ' ' + cmdLineArgs.join(' '); - - var process = nodeExec(cmdLine, function (error, stdout, stderr) { - result.stdout = stdout; - result.stderr = stderr; - result.exitCode = error ? error.code : 0; - handleResult(result); - }); - }; - return NodeExec; -})(); - -var Exec = (function () { - var global = Function("return this;").call(null); - if (typeof global.ActiveXObject !== "undefined") { - return new WindowsScriptHostExec(); - } else { - return new NodeExec(); - } -})(); -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -var IOUtils; -(function (IOUtils) { - // Creates the directory including its parent if not already present - function createDirectoryStructure(ioHost, dirName) { - if (ioHost.directoryExists(dirName)) { - return; - } - - var parentDirectory = ioHost.dirName(dirName); - if (parentDirectory != "") { - createDirectoryStructure(ioHost, parentDirectory); - } - ioHost.createDirectory(dirName); - } - - // Creates a file including its directory structure if not already present - function createFileAndFolderStructure(ioHost, fileName, useUTF8) { - var path = ioHost.resolvePath(fileName); - var dirName = ioHost.dirName(path); - createDirectoryStructure(ioHost, dirName); - return ioHost.createFile(path, useUTF8); - } - IOUtils.createFileAndFolderStructure = createFileAndFolderStructure; - - function throwIOError(message, error) { - var errorMessage = message; - if (error && error.message) { - errorMessage += (" " + error.message); - } - throw new Error(errorMessage); - } - IOUtils.throwIOError = throwIOError; -})(IOUtils || (IOUtils = {})); - -var IO = (function () { - // Create an IO object for use inside WindowsScriptHost hosts - // Depends on WSCript and FileSystemObject - function getWindowsScriptHostIO() { - var fso = new ActiveXObject("Scripting.FileSystemObject"); - var streamObjectPool = []; - - function getStreamObject() { - if (streamObjectPool.length > 0) { - return streamObjectPool.pop(); - } else { - return new ActiveXObject("ADODB.Stream"); - } - } - - function releaseStreamObject(obj) { - streamObjectPool.push(obj); - } - - var args = []; - for (var i = 0; i < WScript.Arguments.length; i++) { - args[i] = WScript.Arguments.Item(i); - } - - return { - readFile: function (path) { - try { - var streamObj = getStreamObject(); - streamObj.Open(); - streamObj.Type = 2; - streamObj.Charset = 'x-ansi'; - streamObj.LoadFromFile(path); - var bomChar = streamObj.ReadText(2); - streamObj.Position = 0; - if ((bomChar.charCodeAt(0) == 0xFE && bomChar.charCodeAt(1) == 0xFF) || (bomChar.charCodeAt(0) == 0xFF && bomChar.charCodeAt(1) == 0xFE)) { - streamObj.Charset = 'unicode'; - } else if (bomChar.charCodeAt(0) == 0xEF && bomChar.charCodeAt(1) == 0xBB) { - streamObj.Charset = 'utf-8'; - } - - // Read the whole file - var str = streamObj.ReadText(-1); - streamObj.Close(); - releaseStreamObject(streamObj); - return str; - } catch (err) { - IOUtils.throwIOError("Error reading file \"" + path + "\".", err); - } - }, - writeFile: function (path, contents) { - var file = this.createFile(path); - file.Write(contents); - file.Close(); - }, - fileExists: function (path) { - return fso.FileExists(path); - }, - resolvePath: function (path) { - return fso.GetAbsolutePathName(path); - }, - dirName: function (path) { - return fso.GetParentFolderName(path); - }, - findFile: function (rootPath, partialFilePath) { - var path = fso.GetAbsolutePathName(rootPath) + "/" + partialFilePath; - - while (true) { - if (fso.FileExists(path)) { - try { - var content = this.readFile(path); - return { content: content, path: path }; - } catch (err) { - //Tools.CompilerDiagnostics.debugPrint("Could not find " + path + ", trying parent"); - } - } else { - rootPath = fso.GetParentFolderName(fso.GetAbsolutePathName(rootPath)); - - if (rootPath == "") { - return null; - } else { - path = fso.BuildPath(rootPath, partialFilePath); - } - } - } - }, - deleteFile: function (path) { - try { - if (fso.FileExists(path)) { - fso.DeleteFile(path, true); - } - } catch (e) { - IOUtils.throwIOError("Couldn't delete file '" + path + "'.", e); - } - }, - createFile: function (path, useUTF8) { - try { - var streamObj = getStreamObject(); - streamObj.Charset = useUTF8 ? 'utf-8' : 'x-ansi'; - streamObj.Open(); - return { - Write: function (str) { - streamObj.WriteText(str, 0); - }, - WriteLine: function (str) { - streamObj.WriteText(str, 1); - }, - Close: function () { - try { - streamObj.SaveToFile(path, 2); - } catch (saveError) { - IOUtils.throwIOError("Couldn't write to file '" + path + "'.", saveError); - } finally { - if (streamObj.State != 0) { - streamObj.Close(); - } - releaseStreamObject(streamObj); - } - } - }; - } catch (creationError) { - IOUtils.throwIOError("Couldn't write to file '" + path + "'.", creationError); - } - }, - directoryExists: function (path) { - return fso.FolderExists(path); - }, - createDirectory: function (path) { - try { - if (!this.directoryExists(path)) { - fso.CreateFolder(path); - } - } catch (e) { - IOUtils.throwIOError("Couldn't create directory '" + path + "'.", e); - } - }, - dir: function (path, spec, options) { - options = options || {}; - function filesInFolder(folder, root) { - var paths = []; - var fc; - - if (options.recursive) { - fc = new Enumerator(folder.subfolders); - - for (; !fc.atEnd(); fc.moveNext()) { - paths = paths.concat(filesInFolder(fc.item(), root + "/" + fc.item().Name)); - } - } - - fc = new Enumerator(folder.files); - - for (; !fc.atEnd(); fc.moveNext()) { - if (!spec || fc.item().Name.match(spec)) { - paths.push(root + "/" + fc.item().Name); - } - } - - return paths; - } - - var folder = fso.GetFolder(path); - var paths = []; - - return filesInFolder(folder, path); - }, - print: function (str) { - WScript.StdOut.Write(str); - }, - printLine: function (str) { - WScript.Echo(str); - }, - arguments: args, - stderr: WScript.StdErr, - stdout: WScript.StdOut, - watchFile: null, - run: function (source, filename) { - try { - eval(source); - } catch (e) { - IOUtils.throwIOError("Error while executing file '" + filename + "'.", e); - } - }, - getExecutingFilePath: function () { - return WScript.ScriptFullName; - }, - quit: function (exitCode) { - if (typeof exitCode === "undefined") { exitCode = 0; } - try { - WScript.Quit(exitCode); - } catch (e) { - } - } - }; - } - ; - - // Create an IO object for use inside Node.js hosts - // Depends on 'fs' and 'path' modules - function getNodeIO() { - var _fs = require('fs'); - var _path = require('path'); - var _module = require('module'); - - return { - readFile: function (file) { - try { - var buffer = _fs.readFileSync(file); - switch (buffer[0]) { - case 0xFE: - if (buffer[1] == 0xFF) { - // utf16-be. Reading the buffer as big endian is not supported, so convert it to - // Little Endian first - var i = 0; - while ((i + 1) < buffer.length) { - var temp = buffer[i]; - buffer[i] = buffer[i + 1]; - buffer[i + 1] = temp; - i += 2; - } - return buffer.toString("ucs2", 2); - } - break; - case 0xFF: - if (buffer[1] == 0xFE) { - // utf16-le - return buffer.toString("ucs2", 2); - } - break; - case 0xEF: - if (buffer[1] == 0xBB) { - // utf-8 - return buffer.toString("utf8", 3); - } - } - - // Default behaviour - return buffer.toString(); - } catch (e) { - IOUtils.throwIOError("Error reading file \"" + file + "\".", e); - } - }, - writeFile: _fs.writeFileSync, - deleteFile: function (path) { - try { - _fs.unlinkSync(path); - } catch (e) { - IOUtils.throwIOError("Couldn't delete file '" + path + "'.", e); - } - }, - fileExists: function (path) { - return _fs.existsSync(path); - }, - createFile: function (path, useUTF8) { - function mkdirRecursiveSync(path) { - var stats = _fs.statSync(path); - if (stats.isFile()) { - IOUtils.throwIOError("\"" + path + "\" exists but isn't a directory.", null); - } else if (stats.isDirectory()) { - return; - } else { - mkdirRecursiveSync(_path.dirname(path)); - _fs.mkdirSync(path, 0775); - } - } - - mkdirRecursiveSync(_path.dirname(path)); - - try { - var fd = _fs.openSync(path, 'w'); - } catch (e) { - IOUtils.throwIOError("Couldn't write to file '" + path + "'.", e); - } - return { - Write: function (str) { - _fs.writeSync(fd, str); - }, - WriteLine: function (str) { - _fs.writeSync(fd, str + '\r\n'); - }, - Close: function () { - _fs.closeSync(fd); - fd = null; - } - }; - }, - dir: function dir(path, spec, options) { - options = options || {}; - - function filesInFolder(folder, deep) { - var paths = []; - - var files = _fs.readdirSync(folder); - for (var i = 0; i < files.length; i++) { - var stat = _fs.statSync(folder + "/" + files[i]); - if (options.recursive && stat.isDirectory()) { - if (deep < (options.deep || 100)) { - paths = paths.concat(filesInFolder(folder + "/" + files[i], 1)); - } - } else if (stat.isFile() && (!spec || files[i].match(spec))) { - paths.push(folder + "/" + files[i]); - } - } - - return paths; - } - - return filesInFolder(path, 0); - }, - createDirectory: function (path) { - try { - if (!this.directoryExists(path)) { - _fs.mkdirSync(path); - } - } catch (e) { - IOUtils.throwIOError("Couldn't create directory '" + path + "'.", e); - } - }, - directoryExists: function (path) { - return _fs.existsSync(path) && _fs.lstatSync(path).isDirectory(); - }, - resolvePath: function (path) { - return _path.resolve(path); - }, - dirName: function (path) { - return _path.dirname(path); - }, - findFile: function (rootPath, partialFilePath) { - var path = rootPath + "/" + partialFilePath; - - while (true) { - if (_fs.existsSync(path)) { - try { - var content = this.readFile(path); - return { content: content, path: path }; - } catch (err) { - //Tools.CompilerDiagnostics.debugPrint(("Could not find " + path) + ", trying parent"); - } - } else { - var parentPath = _path.resolve(rootPath, ".."); - - if (rootPath === parentPath) { - return null; - } else { - rootPath = parentPath; - path = _path.resolve(rootPath, partialFilePath); - } - } - } - }, - print: function (str) { - process.stdout.write(str); - }, - printLine: function (str) { - process.stdout.write(str + '\n'); - }, - arguments: process.argv.slice(2), - stderr: { - Write: function (str) { - process.stderr.write(str); - }, - WriteLine: function (str) { - process.stderr.write(str + '\n'); - }, - Close: function () { - } - }, - stdout: { - Write: function (str) { - process.stdout.write(str); - }, - WriteLine: function (str) { - process.stdout.write(str + '\n'); - }, - Close: function () { - } - }, - watchFile: function (filename, callback) { - var firstRun = true; - var processingChange = false; - - var fileChanged = function (curr, prev) { - if (!firstRun) { - if (curr.mtime < prev.mtime) { - return; - } - - _fs.unwatchFile(filename, fileChanged); - if (!processingChange) { - processingChange = true; - callback(filename); - setTimeout(function () { - processingChange = false; - }, 100); - } - } - firstRun = false; - _fs.watchFile(filename, { persistent: true, interval: 500 }, fileChanged); - }; - - fileChanged(); - return { - filename: filename, - close: function () { - _fs.unwatchFile(filename, fileChanged); - } - }; - }, - run: function (source, filename) { - require.main.filename = filename; - require.main.paths = _module._nodeModulePaths(_path.dirname(_fs.realpathSync(filename))); - require.main._compile(source, filename); - }, - getExecutingFilePath: function () { - return process.mainModule.filename; - }, - quit: process.exit - }; - } - ; - - if (typeof ActiveXObject === "function") - return getWindowsScriptHostIO(); -else if (typeof require === "function") - return getNodeIO(); -else - return null; -})(); -/// -/// -var DefinitelyTyped; -(function (DefinitelyTyped) { - (function (TestManager) { - var path = require('path'); - - function endsWith(str, suffix) { - return str.indexOf(suffix, str.length - suffix.length) !== -1; - } - - var Iterator = (function () { - function Iterator(list) { - this.list = list; - this.index = -1; - } - Iterator.prototype.next = function () { - this.index++; - return this.list[this.index]; - }; - - Iterator.prototype.hasNext = function () { - return this.list[1 + this.index] != null; - }; - return Iterator; - })(); - - var Tsc = (function () { - function Tsc() { - } - Tsc.run = function (tsfile, callback) { - var command = 'node ./_infrastructure/tests/typescript/tsc.js --module commonjs '; - if (IO.fileExists(tsfile + '.tscparams')) { - command += '@' + tsfile + '.tscparams'; - } - Exec.exec(command, [tsfile], function (ExecResult) { - callback(ExecResult); - }); - }; - return Tsc; - })(); - - var Test = (function () { - function Test(tsfile) { - this.tsfile = tsfile; - } - Test.prototype.run = function (callback) { - Tsc.run(this.tsfile, callback); - }; - return Test; - })(); - - var Typing = (function () { - function Typing(name, baseDir) { - this.name = name; - this.fileHandler = new FileHandler(baseDir + '/' + name + '/', /.\.ts/g); - } - return Typing; - })(); - - var FileHandler = (function () { - function FileHandler(path, pattern) { - this.path = path; - this.files = []; - this.typings = []; - this.files = IO.dir(path, pattern, { recursive: true }).sort(); - } - FileHandler.prototype.allTS = function () { - return this.files; - }; - - FileHandler.prototype.allTests = function () { - var tests = []; - - for (var i = 0; i < this.files.length; i++) { - if (endsWith(this.files[i].toUpperCase(), '-TESTS.TS')) { - tests.push(this.files[i]); - } - } - - return tests; - }; - - FileHandler.prototype.allTypings = function () { - var typings = {}; - - for (var i = 0; i < this.files.length; i++) { - var file = this.files[i]; - var firName = path.dirname(file.substr(this.path.length + 1)).replace('\\', '/'); - var dir = firName.split('/')[0]; - - if (!typings[dir]) - typings[dir] = true; - } - - var list = []; - for (var attr in typings) { - list.push(attr); - } - - return list; - }; - return FileHandler; - })(); - - var Timer = (function () { - function Timer() { - this.time = 0; - } - Timer.prettyDate = function (date1, date2) { - var diff = ((date2 - date1) / 1000), day_diff = Math.floor(diff / 86400); - - if (isNaN(day_diff) || day_diff < 0 || day_diff >= 31) - return; - - return (day_diff == 0 && (diff < 60 && (diff + " secconds") || diff < 120 && "1 minute" || diff < 3600 && Math.floor(diff / 60) + " minutes" || diff < 7200 && "1 hour" || diff < 86400 && Math.floor(diff / 3600) + " hours") || day_diff == 1 && "Yesterday" || day_diff < 7 && day_diff + " days" || day_diff < 31 && Math.ceil(day_diff / 7) + " weeks"); - }; - - Timer.prototype.start = function () { - this.time = 0; - this.startTime = this.now(); - }; - - Timer.prototype.now = function () { - return Date.now(); - }; - - Timer.prototype.end = function () { - this.time = (this.now() - this.startTime) / 1000; - this.asString = Timer.prettyDate(this.startTime, this.now()); - }; - return Timer; - })(); - - var Print = (function () { - function Print(version, typings, tsFiles) { - this.version = version; - this.typings = typings; - this.tsFiles = tsFiles; - } - Print.prototype.out = function (s) { - process.stdout.write(s); - }; - - Print.prototype.printHeader = function () { - this.out('=============================================================================\n'); - this.out(' \33[36m\33[1mDefinitelyTyped test runner 0.2.1\33[0m\n'); - this.out('=============================================================================\n'); - this.out(' \33[36m\33[1mTypescript version:\33[0m ' + this.version + '\n'); - this.out(' \33[36m\33[1mTypings :\33[0m ' + this.typings + '\n'); - this.out(' \33[36m\33[1mTypeScript files :\33[0m ' + this.tsFiles + '\n'); - }; - - Print.prototype.printSyntaxChecking = function () { - this.out('============================ \33[34m\33[1mSyntax checking\33[0m ================================\n'); - }; - - Print.prototype.printTypingTests = function () { - this.out('============================= \33[34m\33[1mTyping tests\33[0m ==================================\n'); - }; - - Print.prototype.printSuccess = function () { - this.out('\33[36m\33[1m.\33[0m'); - }; - - Print.prototype.printFailure = function () { - this.out('x'); - }; - - Print.prototype.printDiv = function () { - this.out('-----------------------------------------------------------------------------\n'); - }; - - Print.prototype.printfilesWithSintaxErrorMessage = function () { - this.out(' \33[36m\33[1mFiles with syntax error\33[0m\n'); - }; - - Print.prototype.printFailedTestMessage = function () { - this.out(' \33[36m\33[1mFailed tests\33[0m\n'); - }; - - Print.prototype.printTypingsWithoutTestsMessage = function () { - this.out(' \33[36m\33[1mTyping without tests\33[0m\n'); - }; - - Print.prototype.printTotalMessage = function () { - this.out(' \33[36m\33[1mTotal\33[0m\n'); - }; - - Print.prototype.printErrorFile = function (file) { - this.out(' - ' + file + '\n'); - }; - - Print.prototype.printTypingsWithoutTest = function (file) { - this.out(' - \33[33m\33[1m' + file + '\33[0m\n'); - }; - - Print.prototype.breack = function () { - this.out('\n'); - }; - - Print.prototype.printSuccessCount = function (current, total) { - this.out(' \33[36m\33[1mSuccessful :\33[0m \33[32m\33[1m' + ((current / total) * 100).toFixed(2) + '% (' + current + '/' + total + ')\33[0m\n'); - }; - - Print.prototype.printFailedCount = function (current, total) { - this.out(' \33[36m\33[1mFailure :\33[0m \33[31m\33[1m' + ((current / total) * 100).toFixed(2) + '% (' + current + '/' + total + ')\33[0m\n'); - }; - - Print.prototype.printElapsedTime = function (time, s) { - this.out(' \33[36m\33[1mElapsed time :\33[0m ~' + time + ' (' + s + 's)\n'); - }; - - Print.prototype.printSyntaxErrorCount = function (current, total) { - this.out(' \33[36m\33[1mSyntax error :\33[0m \33[31m\33[1m' + ((current / total) * 100).toFixed(2) + '% (' + current + '/' + total + ')\33[0m\n'); - }; - - Print.prototype.printTestErrorCount = function (current, total) { - this.out(' \33[36m\33[1mFailed tests :\33[0m \33[31m\33[1m' + ((current / total) * 100).toFixed(2) + '% (' + current + '/' + total + ')\33[0m\n'); - }; - - Print.prototype.printWithoutTestCount = function (current, total) { - this.out(' \33[36m\33[1mWithout tests :\33[0m \33[33m\33[1m' + ((current / total) * 100).toFixed(2) + '% (' + current + '/' + total + ')\33[0m\n'); - }; - return Print; - })(); - - var File = (function () { - function File(name, hasError) { - this.name = name; - this.hasError = hasError; - } - File.prototype.formatName = function (baseDir) { - var dirName = path.dirname(this.name.substr(baseDir.length + 1)).replace('\\', '/'); - var dir = dirName.split('/')[0]; - var file = path.basename(this.name, '.ts'); - var ext = path.extname(this.name); - - return dir + ((dirName.split('/').length > 1) ? '/-/' : '/') + '\33[36m\33[1m' + file + '\33[0m' + ext; - }; - return File; - })(); - - var SyntaxChecking = (function () { - function SyntaxChecking(fileHandler, out) { - this.fileHandler = fileHandler; - this.out = out; - this.files = []; - this.timer = new Timer(); - } - SyntaxChecking.prototype.getFailedFiles = function () { - var list = []; - - for (var i = 0; i < this.files.length; i++) { - if (this.files[i].hasError) { - list.push(this.files[i]); - } - } - - return list; - }; - - SyntaxChecking.prototype.getSuccessFiles = function () { - var list = []; - - for (var i = 0; i < this.files.length; i++) { - if (!this.files[i].hasError) { - list.push(this.files[i]); - } - } - - return list; - }; - - SyntaxChecking.prototype.printStats = function () { - this.out.printDiv(); - this.out.printElapsedTime(this.timer.asString, this.timer.time); - this.out.printSuccessCount(this.getSuccessFiles().length, this.files.length); - this.out.printFailedCount(this.getFailedFiles().length, this.files.length); - }; - - SyntaxChecking.prototype.printFailedFiles = function () { - if (this.getFailedFiles().length > 0) { - this.out.printDiv(); - - this.out.printfilesWithSintaxErrorMessage(); - - this.out.printDiv(); - - for (var i = 0; i < this.getFailedFiles().length; i++) { - var errorFile = this.getFailedFiles()[i]; - this.out.printErrorFile(errorFile.formatName(this.fileHandler.path)); - } - } - }; - - SyntaxChecking.prototype.run = function (it, file, len, maxLen, callback) { - var _this = this; - if (!endsWith(file.toUpperCase(), '-TESTS.TS') && endsWith(file.toUpperCase(), '.TS') && file.indexOf('../_infrastructure') < 0) { - new Test(file).run(function (o) { - var failed = false; - - if (o.exitCode === 1) { - _this.out.printFailure(); - failed = true; - len++; - } else { - _this.out.printSuccess(); - len++; - } - - _this.files.push(new File(file, failed)); - - if (len > maxLen) { - len = 0; - _this.out.breack(); - } - - if (it.hasNext()) { - _this.run(it, it.next(), len, maxLen, callback); - } else { - _this.out.breack(); - _this.timer.end(); - _this.printFailedFiles(); - _this.printStats(); - - callback(_this.getFailedFiles().length, _this.files.length); - } - }); - } else if (it.hasNext()) { - this.run(it, it.next(), len, maxLen, callback); - } else { - this.out.breack(); - this.timer.end(); - this.printStats(); - this.printFailedFiles(); - - callback(this.getFailedFiles().length, this.files.length); - } - }; - - SyntaxChecking.prototype.start = function (callback) { - this.timer.start(); - - var tsFiles = this.fileHandler.allTS(); - - var it = new Iterator(tsFiles); - - var len = 0; - var maxLen = 76; - - if (it.hasNext()) { - this.run(it, it.next(), len, maxLen, callback); - } - }; - return SyntaxChecking; - })(); - - var TestEval = (function () { - function TestEval(fileHandler, out) { - this.fileHandler = fileHandler; - this.out = out; - this.files = []; - this.timer = new Timer(); - } - TestEval.prototype.getFailedFiles = function () { - var list = []; - - for (var i = 0; i < this.files.length; i++) { - if (this.files[i].hasError) { - list.push(this.files[i]); - } - } - - return list; - }; - - TestEval.prototype.getSuccessFiles = function () { - var list = []; - - for (var i = 0; i < this.files.length; i++) { - if (!this.files[i].hasError) { - list.push(this.files[i]); - } - } - - return list; - }; - - TestEval.prototype.printStats = function () { - this.out.printDiv(); - this.out.printElapsedTime(this.timer.asString, this.timer.time); - this.out.printSuccessCount(this.getSuccessFiles().length, this.files.length); - this.out.printFailedCount(this.getFailedFiles().length, this.files.length); - }; - - TestEval.prototype.printFailedFiles = function () { - if (this.getFailedFiles().length > 0) { - this.out.printDiv(); - - this.out.printFailedTestMessage(); - - this.out.printDiv(); - - for (var i = 0; i < this.getFailedFiles().length; i++) { - var errorFile = this.getFailedFiles()[i]; - this.out.printErrorFile(errorFile.formatName(this.fileHandler.path)); - } - } - }; - - TestEval.prototype.run = function (it, file, len, maxLen, callback) { - var _this = this; - if (endsWith(file.toUpperCase(), '-TESTS.TS')) { - new Test(file).run(function (o) { - var failed = false; - - if (o.exitCode === 1) { - _this.out.printFailure(); - failed = true; - len++; - } else { - _this.out.printSuccess(); - len++; - } - - _this.files.push(new File(file, failed)); - - if (len > maxLen) { - len = 0; - _this.out.breack(); - } - - if (it.hasNext()) { - _this.run(it, it.next(), len, maxLen, callback); - } else { - _this.out.breack(); - _this.timer.end(); - _this.printFailedFiles(); - _this.printStats(); - - callback(_this.getFailedFiles().length, _this.files.length); - } - }); - } else if (it.hasNext()) { - this.run(it, it.next(), len, maxLen, callback); - } else { - this.out.breack(); - this.timer.end(); - this.printFailedFiles(); - this.printStats(); - - callback(this.getFailedFiles().length, this.files.length); - } - }; - - TestEval.prototype.start = function (callback) { - this.timer.start(); - - var tsFiles = this.fileHandler.allTS(); - - var it = new Iterator(tsFiles); - - var len = 0; - var maxLen = 76; - - if (it.hasNext()) { - this.run(it, it.next(), len, maxLen, callback); - } - }; - return TestEval; - })(); - - var TestRunner = (function () { - function TestRunner(dtPath) { - this.dtPath = dtPath; - this.typings = []; - this.fh = new FileHandler(dtPath, /.\.ts/g); - this.out = new Print('0.9.1.0', this.fh.allTypings().length, this.fh.allTS().length); - this.sc = new SyntaxChecking(this.fh, this.out); - this.te = new TestEval(this.fh, this.out); - - var tpgs = this.fh.allTypings(); - for (var i = 0; i < tpgs.length; i++) { - this.typings.push(new Typing(tpgs[i], this.dtPath)); - } - } - TestRunner.prototype.printTypingsWithoutTest = function () { - var count = 0; - - if (this.typings.length > 0) { - this.out.printDiv(); - - this.out.printTypingsWithoutTestsMessage(); - - this.out.printDiv(); - - for (var i = 0; i < this.typings.length; i++) { - var typing = this.typings[i]; - if (typing.fileHandler.allTests().length == 0) { - if (typing.name != '_infrastructure' && typing.name != '_ReSharper.DefinitelyTyped' && typing.name != 'obj' && typing.name != 'bin' && typing.name != 'Properties') { - this.out.printTypingsWithoutTest(typing.name); - count++; - } - } - } - } - - return count; - }; - - TestRunner.prototype.run = function () { - var _this = this; - var timer = new Timer(); - timer.start(); - - this.out.printHeader(); - this.out.printSyntaxChecking(); - - this.sc.start(function (syntaxFailedCount, syntaxTotal) { - _this.out.printTypingTests(); - _this.te.start(function (testFailedCount, testTotal) { - var total = _this.printTypingsWithoutTest(); - - timer.end(); - - _this.out.printDiv(); - _this.out.printTotalMessage(); - _this.out.printDiv(); - - _this.out.printElapsedTime(timer.asString, timer.time); - _this.out.printSyntaxErrorCount(syntaxFailedCount, syntaxTotal); - _this.out.printTestErrorCount(testFailedCount, testTotal); - _this.out.printWithoutTestCount(total, _this.fh.allTypings().length); - - _this.out.printDiv(); - - if (syntaxFailedCount > 0 || testFailedCount > 0) { - process.exit(1); - } - }); - }); - }; - return TestRunner; - })(); - TestManager.TestRunner = TestRunner; - })(DefinitelyTyped.TestManager || (DefinitelyTyped.TestManager = {})); - var TestManager = DefinitelyTyped.TestManager; -})(DefinitelyTyped || (DefinitelyTyped = {})); - -var dtPath = __dirname + '/../..'; - -var runner = new DefinitelyTyped.TestManager.TestRunner(dtPath); -runner.run(); +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +var ExecResult = (function () { + function ExecResult() { + this.stdout = ""; + this.stderr = ""; + } + return ExecResult; +})(); + +var WindowsScriptHostExec = (function () { + function WindowsScriptHostExec() { + } + WindowsScriptHostExec.prototype.exec = function (filename, cmdLineArgs, handleResult) { + var result = new ExecResult(); + var shell = new ActiveXObject('WScript.Shell'); + try { + var process = shell.Exec(filename + ' ' + cmdLineArgs.join(' ')); + } catch (e) { + result.stderr = e.message; + result.exitCode = 1; + handleResult(result); + return; + } + + while (process.Status != 0) { + } + + result.exitCode = process.ExitCode; + if (!process.StdOut.AtEndOfStream) + result.stdout = process.StdOut.ReadAll(); + if (!process.StdErr.AtEndOfStream) + result.stderr = process.StdErr.ReadAll(); + + handleResult(result); + }; + return WindowsScriptHostExec; +})(); + +var NodeExec = (function () { + function NodeExec() { + } + NodeExec.prototype.exec = function (filename, cmdLineArgs, handleResult) { + var nodeExec = require('child_process').exec; + + var result = new ExecResult(); + result.exitCode = null; + var cmdLine = filename + ' ' + cmdLineArgs.join(' '); + + var process = nodeExec(cmdLine, function (error, stdout, stderr) { + result.stdout = stdout; + result.stderr = stderr; + result.exitCode = error ? error.code : 0; + handleResult(result); + }); + }; + return NodeExec; +})(); + +var Exec = (function () { + var global = Function("return this;").call(null); + if (typeof global.ActiveXObject !== "undefined") { + return new WindowsScriptHostExec(); + } else { + return new NodeExec(); + } +})(); +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +var IOUtils; +(function (IOUtils) { + // Creates the directory including its parent if not already present + function createDirectoryStructure(ioHost, dirName) { + if (ioHost.directoryExists(dirName)) { + return; + } + + var parentDirectory = ioHost.dirName(dirName); + if (parentDirectory != "") { + createDirectoryStructure(ioHost, parentDirectory); + } + ioHost.createDirectory(dirName); + } + + // Creates a file including its directory structure if not already present + function createFileAndFolderStructure(ioHost, fileName, useUTF8) { + var path = ioHost.resolvePath(fileName); + var dirName = ioHost.dirName(path); + createDirectoryStructure(ioHost, dirName); + return ioHost.createFile(path, useUTF8); + } + IOUtils.createFileAndFolderStructure = createFileAndFolderStructure; + + function throwIOError(message, error) { + var errorMessage = message; + if (error && error.message) { + errorMessage += (" " + error.message); + } + throw new Error(errorMessage); + } + IOUtils.throwIOError = throwIOError; +})(IOUtils || (IOUtils = {})); + +var IO = (function () { + // Create an IO object for use inside WindowsScriptHost hosts + // Depends on WSCript and FileSystemObject + function getWindowsScriptHostIO() { + var fso = new ActiveXObject("Scripting.FileSystemObject"); + var streamObjectPool = []; + + function getStreamObject() { + if (streamObjectPool.length > 0) { + return streamObjectPool.pop(); + } else { + return new ActiveXObject("ADODB.Stream"); + } + } + + function releaseStreamObject(obj) { + streamObjectPool.push(obj); + } + + var args = []; + for (var i = 0; i < WScript.Arguments.length; i++) { + args[i] = WScript.Arguments.Item(i); + } + + return { + readFile: function (path) { + try { + var streamObj = getStreamObject(); + streamObj.Open(); + streamObj.Type = 2; + streamObj.Charset = 'x-ansi'; + streamObj.LoadFromFile(path); + var bomChar = streamObj.ReadText(2); + streamObj.Position = 0; + if ((bomChar.charCodeAt(0) == 0xFE && bomChar.charCodeAt(1) == 0xFF) || (bomChar.charCodeAt(0) == 0xFF && bomChar.charCodeAt(1) == 0xFE)) { + streamObj.Charset = 'unicode'; + } else if (bomChar.charCodeAt(0) == 0xEF && bomChar.charCodeAt(1) == 0xBB) { + streamObj.Charset = 'utf-8'; + } + + // Read the whole file + var str = streamObj.ReadText(-1); + streamObj.Close(); + releaseStreamObject(streamObj); + return str; + } catch (err) { + IOUtils.throwIOError("Error reading file \"" + path + "\".", err); + } + }, + writeFile: function (path, contents) { + var file = this.createFile(path); + file.Write(contents); + file.Close(); + }, + fileExists: function (path) { + return fso.FileExists(path); + }, + resolvePath: function (path) { + return fso.GetAbsolutePathName(path); + }, + dirName: function (path) { + return fso.GetParentFolderName(path); + }, + findFile: function (rootPath, partialFilePath) { + var path = fso.GetAbsolutePathName(rootPath) + "/" + partialFilePath; + + while (true) { + if (fso.FileExists(path)) { + try { + var content = this.readFile(path); + return { content: content, path: path }; + } catch (err) { + //Tools.CompilerDiagnostics.debugPrint("Could not find " + path + ", trying parent"); + } + } else { + rootPath = fso.GetParentFolderName(fso.GetAbsolutePathName(rootPath)); + + if (rootPath == "") { + return null; + } else { + path = fso.BuildPath(rootPath, partialFilePath); + } + } + } + }, + deleteFile: function (path) { + try { + if (fso.FileExists(path)) { + fso.DeleteFile(path, true); + } + } catch (e) { + IOUtils.throwIOError("Couldn't delete file '" + path + "'.", e); + } + }, + createFile: function (path, useUTF8) { + try { + var streamObj = getStreamObject(); + streamObj.Charset = useUTF8 ? 'utf-8' : 'x-ansi'; + streamObj.Open(); + return { + Write: function (str) { + streamObj.WriteText(str, 0); + }, + WriteLine: function (str) { + streamObj.WriteText(str, 1); + }, + Close: function () { + try { + streamObj.SaveToFile(path, 2); + } catch (saveError) { + IOUtils.throwIOError("Couldn't write to file '" + path + "'.", saveError); + } finally { + if (streamObj.State != 0) { + streamObj.Close(); + } + releaseStreamObject(streamObj); + } + } + }; + } catch (creationError) { + IOUtils.throwIOError("Couldn't write to file '" + path + "'.", creationError); + } + }, + directoryExists: function (path) { + return fso.FolderExists(path); + }, + createDirectory: function (path) { + try { + if (!this.directoryExists(path)) { + fso.CreateFolder(path); + } + } catch (e) { + IOUtils.throwIOError("Couldn't create directory '" + path + "'.", e); + } + }, + dir: function (path, spec, options) { + options = options || {}; + function filesInFolder(folder, root) { + var paths = []; + var fc; + + if (options.recursive) { + fc = new Enumerator(folder.subfolders); + + for (; !fc.atEnd(); fc.moveNext()) { + paths = paths.concat(filesInFolder(fc.item(), root + "/" + fc.item().Name)); + } + } + + fc = new Enumerator(folder.files); + + for (; !fc.atEnd(); fc.moveNext()) { + if (!spec || fc.item().Name.match(spec)) { + paths.push(root + "/" + fc.item().Name); + } + } + + return paths; + } + + var folder = fso.GetFolder(path); + var paths = []; + + return filesInFolder(folder, path); + }, + print: function (str) { + WScript.StdOut.Write(str); + }, + printLine: function (str) { + WScript.Echo(str); + }, + arguments: args, + stderr: WScript.StdErr, + stdout: WScript.StdOut, + watchFile: null, + run: function (source, filename) { + try { + eval(source); + } catch (e) { + IOUtils.throwIOError("Error while executing file '" + filename + "'.", e); + } + }, + getExecutingFilePath: function () { + return WScript.ScriptFullName; + }, + quit: function (exitCode) { + if (typeof exitCode === "undefined") { exitCode = 0; } + try { + WScript.Quit(exitCode); + } catch (e) { + } + } + }; + } + ; + + // Create an IO object for use inside Node.js hosts + // Depends on 'fs' and 'path' modules + function getNodeIO() { + var _fs = require('fs'); + var _path = require('path'); + var _module = require('module'); + + return { + readFile: function (file) { + try { + var buffer = _fs.readFileSync(file); + switch (buffer[0]) { + case 0xFE: + if (buffer[1] == 0xFF) { + // utf16-be. Reading the buffer as big endian is not supported, so convert it to + // Little Endian first + var i = 0; + while ((i + 1) < buffer.length) { + var temp = buffer[i]; + buffer[i] = buffer[i + 1]; + buffer[i + 1] = temp; + i += 2; + } + return buffer.toString("ucs2", 2); + } + break; + case 0xFF: + if (buffer[1] == 0xFE) { + // utf16-le + return buffer.toString("ucs2", 2); + } + break; + case 0xEF: + if (buffer[1] == 0xBB) { + // utf-8 + return buffer.toString("utf8", 3); + } + } + + // Default behaviour + return buffer.toString(); + } catch (e) { + IOUtils.throwIOError("Error reading file \"" + file + "\".", e); + } + }, + writeFile: _fs.writeFileSync, + deleteFile: function (path) { + try { + _fs.unlinkSync(path); + } catch (e) { + IOUtils.throwIOError("Couldn't delete file '" + path + "'.", e); + } + }, + fileExists: function (path) { + return _fs.existsSync(path); + }, + createFile: function (path, useUTF8) { + function mkdirRecursiveSync(path) { + var stats = _fs.statSync(path); + if (stats.isFile()) { + IOUtils.throwIOError("\"" + path + "\" exists but isn't a directory.", null); + } else if (stats.isDirectory()) { + return; + } else { + mkdirRecursiveSync(_path.dirname(path)); + _fs.mkdirSync(path, 0775); + } + } + + mkdirRecursiveSync(_path.dirname(path)); + + try { + var fd = _fs.openSync(path, 'w'); + } catch (e) { + IOUtils.throwIOError("Couldn't write to file '" + path + "'.", e); + } + return { + Write: function (str) { + _fs.writeSync(fd, str); + }, + WriteLine: function (str) { + _fs.writeSync(fd, str + '\r\n'); + }, + Close: function () { + _fs.closeSync(fd); + fd = null; + } + }; + }, + dir: function dir(path, spec, options) { + options = options || {}; + + function filesInFolder(folder, deep) { + var paths = []; + + var files = _fs.readdirSync(folder); + for (var i = 0; i < files.length; i++) { + var stat = _fs.statSync(folder + "/" + files[i]); + if (options.recursive && stat.isDirectory()) { + if (deep < (options.deep || 100)) { + paths = paths.concat(filesInFolder(folder + "/" + files[i], 1)); + } + } else if (stat.isFile() && (!spec || files[i].match(spec))) { + paths.push(folder + "/" + files[i]); + } + } + + return paths; + } + + return filesInFolder(path, 0); + }, + createDirectory: function (path) { + try { + if (!this.directoryExists(path)) { + _fs.mkdirSync(path); + } + } catch (e) { + IOUtils.throwIOError("Couldn't create directory '" + path + "'.", e); + } + }, + directoryExists: function (path) { + return _fs.existsSync(path) && _fs.lstatSync(path).isDirectory(); + }, + resolvePath: function (path) { + return _path.resolve(path); + }, + dirName: function (path) { + return _path.dirname(path); + }, + findFile: function (rootPath, partialFilePath) { + var path = rootPath + "/" + partialFilePath; + + while (true) { + if (_fs.existsSync(path)) { + try { + var content = this.readFile(path); + return { content: content, path: path }; + } catch (err) { + //Tools.CompilerDiagnostics.debugPrint(("Could not find " + path) + ", trying parent"); + } + } else { + var parentPath = _path.resolve(rootPath, ".."); + + if (rootPath === parentPath) { + return null; + } else { + rootPath = parentPath; + path = _path.resolve(rootPath, partialFilePath); + } + } + } + }, + print: function (str) { + process.stdout.write(str); + }, + printLine: function (str) { + process.stdout.write(str + '\n'); + }, + arguments: process.argv.slice(2), + stderr: { + Write: function (str) { + process.stderr.write(str); + }, + WriteLine: function (str) { + process.stderr.write(str + '\n'); + }, + Close: function () { + } + }, + stdout: { + Write: function (str) { + process.stdout.write(str); + }, + WriteLine: function (str) { + process.stdout.write(str + '\n'); + }, + Close: function () { + } + }, + watchFile: function (filename, callback) { + var firstRun = true; + var processingChange = false; + + var fileChanged = function (curr, prev) { + if (!firstRun) { + if (curr.mtime < prev.mtime) { + return; + } + + _fs.unwatchFile(filename, fileChanged); + if (!processingChange) { + processingChange = true; + callback(filename); + setTimeout(function () { + processingChange = false; + }, 100); + } + } + firstRun = false; + _fs.watchFile(filename, { persistent: true, interval: 500 }, fileChanged); + }; + + fileChanged(); + return { + filename: filename, + close: function () { + _fs.unwatchFile(filename, fileChanged); + } + }; + }, + run: function (source, filename) { + require.main.filename = filename; + require.main.paths = _module._nodeModulePaths(_path.dirname(_fs.realpathSync(filename))); + require.main._compile(source, filename); + }, + getExecutingFilePath: function () { + return process.mainModule.filename; + }, + quit: process.exit + }; + } + ; + + if (typeof ActiveXObject === "function") + return getWindowsScriptHostIO(); +else if (typeof require === "function") + return getNodeIO(); +else + return null; +})(); +/// +/// +var DefinitelyTyped; +(function (DefinitelyTyped) { + (function (TestManager) { + var path = require('path'); + + function endsWith(str, suffix) { + return str.indexOf(suffix, str.length - suffix.length) !== -1; + } + + var Iterator = (function () { + function Iterator(list) { + this.list = list; + this.index = -1; + } + Iterator.prototype.next = function () { + this.index++; + return this.list[this.index]; + }; + + Iterator.prototype.hasNext = function () { + return this.list[1 + this.index] != null; + }; + return Iterator; + })(); + + var Tsc = (function () { + function Tsc() { + } + Tsc.run = function (tsfile, callback) { + var command = 'node ./_infrastructure/tests/typescript/tsc.js --module commonjs '; + if (IO.fileExists(tsfile + '.tscparams')) { + command += '@' + tsfile + '.tscparams'; + } + Exec.exec(command, [tsfile], function (ExecResult) { + callback(ExecResult); + }); + }; + return Tsc; + })(); + + var Test = (function () { + function Test(tsfile) { + this.tsfile = tsfile; + } + Test.prototype.run = function (callback) { + Tsc.run(this.tsfile, callback); + }; + return Test; + })(); + + var Typing = (function () { + function Typing(name, baseDir) { + this.name = name; + this.fileHandler = new FileHandler(baseDir + '/' + name + '/', /.\.ts/g); + } + return Typing; + })(); + + var FileHandler = (function () { + function FileHandler(path, pattern) { + this.path = path; + this.files = []; + this.typings = []; + this.files = IO.dir(path, pattern, { recursive: true }).sort(); + } + FileHandler.prototype.allTS = function () { + return this.files; + }; + + FileHandler.prototype.allTests = function () { + var tests = []; + + for (var i = 0; i < this.files.length; i++) { + if (endsWith(this.files[i].toUpperCase(), '-TESTS.TS')) { + tests.push(this.files[i]); + } + } + + return tests; + }; + + FileHandler.prototype.allTypings = function () { + var typings = {}; + + for (var i = 0; i < this.files.length; i++) { + var file = this.files[i]; + var firName = path.dirname(file.substr(this.path.length + 1)).replace('\\', '/'); + var dir = firName.split('/')[0]; + + if (!typings[dir]) + typings[dir] = true; + } + + var list = []; + for (var attr in typings) { + list.push(attr); + } + + return list; + }; + return FileHandler; + })(); + + var Timer = (function () { + function Timer() { + this.time = 0; + } + Timer.prettyDate = function (date1, date2) { + var diff = ((date2 - date1) / 1000), day_diff = Math.floor(diff / 86400); + + if (isNaN(day_diff) || day_diff < 0 || day_diff >= 31) + return; + + return (day_diff == 0 && (diff < 60 && (diff + " secconds") || diff < 120 && "1 minute" || diff < 3600 && Math.floor(diff / 60) + " minutes" || diff < 7200 && "1 hour" || diff < 86400 && Math.floor(diff / 3600) + " hours") || day_diff == 1 && "Yesterday" || day_diff < 7 && day_diff + " days" || day_diff < 31 && Math.ceil(day_diff / 7) + " weeks"); + }; + + Timer.prototype.start = function () { + this.time = 0; + this.startTime = this.now(); + }; + + Timer.prototype.now = function () { + return Date.now(); + }; + + Timer.prototype.end = function () { + this.time = (this.now() - this.startTime) / 1000; + this.asString = Timer.prettyDate(this.startTime, this.now()); + }; + return Timer; + })(); + + var Print = (function () { + function Print(version, typings, tsFiles) { + this.version = version; + this.typings = typings; + this.tsFiles = tsFiles; + } + Print.prototype.out = function (s) { + process.stdout.write(s); + }; + + Print.prototype.printHeader = function () { + this.out('=============================================================================\n'); + this.out(' \33[36m\33[1mDefinitelyTyped test runner 0.3.0\33[0m\n'); + this.out('=============================================================================\n'); + this.out(' \33[36m\33[1mTypescript version:\33[0m ' + this.version + '\n'); + this.out(' \33[36m\33[1mTypings :\33[0m ' + this.typings + '\n'); + this.out(' \33[36m\33[1mTypeScript files :\33[0m ' + this.tsFiles + '\n'); + }; + + Print.prototype.printSyntaxChecking = function () { + this.out('============================ \33[34m\33[1mSyntax checking\33[0m ================================\n'); + }; + + Print.prototype.printTypingTests = function () { + this.out('============================= \33[34m\33[1mTyping tests\33[0m ==================================\n'); + }; + + Print.prototype.printSuccess = function () { + this.out('\33[36m\33[1m.\33[0m'); + }; + + Print.prototype.printFailure = function () { + this.out('x'); + }; + + Print.prototype.printDiv = function () { + this.out('-----------------------------------------------------------------------------\n'); + }; + + Print.prototype.printfilesWithSintaxErrorMessage = function () { + this.out(' \33[36m\33[1mFiles with syntax error\33[0m\n'); + }; + + Print.prototype.printFailedTestMessage = function () { + this.out(' \33[36m\33[1mFailed tests\33[0m\n'); + }; + + Print.prototype.printTypingsWithoutTestsMessage = function () { + this.out(' \33[36m\33[1mTyping without tests\33[0m\n'); + }; + + Print.prototype.printTotalMessage = function () { + this.out(' \33[36m\33[1mTotal\33[0m\n'); + }; + + Print.prototype.printErrorFile = function (file) { + this.out(' - ' + file + '\n'); + }; + + Print.prototype.printTypingsWithoutTest = function (file) { + this.out(' - \33[33m\33[1m' + file + '\33[0m\n'); + }; + + Print.prototype.breack = function () { + this.out('\n'); + }; + + Print.prototype.printSuccessCount = function (current, total) { + this.out(' \33[36m\33[1mSuccessful :\33[0m \33[32m\33[1m' + ((current / total) * 100).toFixed(2) + '% (' + current + '/' + total + ')\33[0m\n'); + }; + + Print.prototype.printFailedCount = function (current, total) { + this.out(' \33[36m\33[1mFailure :\33[0m \33[31m\33[1m' + ((current / total) * 100).toFixed(2) + '% (' + current + '/' + total + ')\33[0m\n'); + }; + + Print.prototype.printElapsedTime = function (time, s) { + this.out(' \33[36m\33[1mElapsed time :\33[0m ~' + time + ' (' + s + 's)\n'); + }; + + Print.prototype.printSyntaxErrorCount = function (current, total) { + this.out(' \33[36m\33[1mSyntax error :\33[0m \33[31m\33[1m' + ((current / total) * 100).toFixed(2) + '% (' + current + '/' + total + ')\33[0m\n'); + }; + + Print.prototype.printTestErrorCount = function (current, total) { + this.out(' \33[36m\33[1mFailed tests :\33[0m \33[31m\33[1m' + ((current / total) * 100).toFixed(2) + '% (' + current + '/' + total + ')\33[0m\n'); + }; + + Print.prototype.printWithoutTestCount = function (current, total) { + this.out(' \33[36m\33[1mWithout tests :\33[0m \33[33m\33[1m' + ((current / total) * 100).toFixed(2) + '% (' + current + '/' + total + ')\33[0m\n'); + }; + return Print; + })(); + + var File = (function () { + function File(name, hasError) { + this.name = name; + this.hasError = hasError; + } + File.prototype.formatName = function (baseDir) { + var dirName = path.dirname(this.name.substr(baseDir.length + 1)).replace('\\', '/'); + var dir = dirName.split('/')[0]; + var file = path.basename(this.name, '.ts'); + var ext = path.extname(this.name); + + return dir + ((dirName.split('/').length > 1) ? '/-/' : '/') + '\33[36m\33[1m' + file + '\33[0m' + ext; + }; + return File; + })(); + + var SyntaxChecking = (function () { + function SyntaxChecking(fileHandler, out) { + this.fileHandler = fileHandler; + this.out = out; + this.files = []; + this.timer = new Timer(); + } + SyntaxChecking.prototype.getFailedFiles = function () { + var list = []; + + for (var i = 0; i < this.files.length; i++) { + if (this.files[i].hasError) { + list.push(this.files[i]); + } + } + + return list; + }; + + SyntaxChecking.prototype.getSuccessFiles = function () { + var list = []; + + for (var i = 0; i < this.files.length; i++) { + if (!this.files[i].hasError) { + list.push(this.files[i]); + } + } + + return list; + }; + + SyntaxChecking.prototype.printStats = function () { + this.out.printDiv(); + this.out.printElapsedTime(this.timer.asString, this.timer.time); + this.out.printSuccessCount(this.getSuccessFiles().length, this.files.length); + this.out.printFailedCount(this.getFailedFiles().length, this.files.length); + }; + + SyntaxChecking.prototype.printFailedFiles = function () { + if (this.getFailedFiles().length > 0) { + this.out.printDiv(); + + this.out.printfilesWithSintaxErrorMessage(); + + this.out.printDiv(); + + for (var i = 0; i < this.getFailedFiles().length; i++) { + var errorFile = this.getFailedFiles()[i]; + this.out.printErrorFile(errorFile.formatName(this.fileHandler.path)); + } + } + }; + + SyntaxChecking.prototype.run = function (it, file, len, maxLen, callback) { + var _this = this; + if (!endsWith(file.toUpperCase(), '-TESTS.TS') && endsWith(file.toUpperCase(), '.TS') && file.indexOf('../_infrastructure') < 0) { + new Test(file).run(function (o) { + var failed = false; + + if (o.exitCode === 1) { + _this.out.printFailure(); + failed = true; + len++; + } else { + _this.out.printSuccess(); + len++; + } + + _this.files.push(new File(file, failed)); + + if (len > maxLen) { + len = 0; + _this.out.breack(); + } + + if (it.hasNext()) { + _this.run(it, it.next(), len, maxLen, callback); + } else { + _this.out.breack(); + _this.timer.end(); + _this.printFailedFiles(); + _this.printStats(); + + callback(_this.getFailedFiles().length, _this.files.length); + } + }); + } else if (it.hasNext()) { + this.run(it, it.next(), len, maxLen, callback); + } else { + this.out.breack(); + this.timer.end(); + this.printStats(); + this.printFailedFiles(); + + callback(this.getFailedFiles().length, this.files.length); + } + }; + + SyntaxChecking.prototype.start = function (callback) { + this.timer.start(); + + var tsFiles = this.fileHandler.allTS(); + + var it = new Iterator(tsFiles); + + var len = 0; + var maxLen = 76; + + if (it.hasNext()) { + this.run(it, it.next(), len, maxLen, callback); + } + }; + return SyntaxChecking; + })(); + + var TestEval = (function () { + function TestEval(fileHandler, out) { + this.fileHandler = fileHandler; + this.out = out; + this.files = []; + this.timer = new Timer(); + } + TestEval.prototype.getFailedFiles = function () { + var list = []; + + for (var i = 0; i < this.files.length; i++) { + if (this.files[i].hasError) { + list.push(this.files[i]); + } + } + + return list; + }; + + TestEval.prototype.getSuccessFiles = function () { + var list = []; + + for (var i = 0; i < this.files.length; i++) { + if (!this.files[i].hasError) { + list.push(this.files[i]); + } + } + + return list; + }; + + TestEval.prototype.printStats = function () { + this.out.printDiv(); + this.out.printElapsedTime(this.timer.asString, this.timer.time); + this.out.printSuccessCount(this.getSuccessFiles().length, this.files.length); + this.out.printFailedCount(this.getFailedFiles().length, this.files.length); + }; + + TestEval.prototype.printFailedFiles = function () { + if (this.getFailedFiles().length > 0) { + this.out.printDiv(); + + this.out.printFailedTestMessage(); + + this.out.printDiv(); + + for (var i = 0; i < this.getFailedFiles().length; i++) { + var errorFile = this.getFailedFiles()[i]; + this.out.printErrorFile(errorFile.formatName(this.fileHandler.path)); + } + } + }; + + TestEval.prototype.run = function (it, file, len, maxLen, callback) { + var _this = this; + if (endsWith(file.toUpperCase(), '-TESTS.TS')) { + new Test(file).run(function (o) { + var failed = false; + + if (o.exitCode === 1) { + _this.out.printFailure(); + failed = true; + len++; + } else { + _this.out.printSuccess(); + len++; + } + + _this.files.push(new File(file, failed)); + + if (len > maxLen) { + len = 0; + _this.out.breack(); + } + + if (it.hasNext()) { + _this.run(it, it.next(), len, maxLen, callback); + } else { + _this.out.breack(); + _this.timer.end(); + _this.printFailedFiles(); + _this.printStats(); + + callback(_this.getFailedFiles().length, _this.files.length); + } + }); + } else if (it.hasNext()) { + this.run(it, it.next(), len, maxLen, callback); + } else { + this.out.breack(); + this.timer.end(); + this.printFailedFiles(); + this.printStats(); + + callback(this.getFailedFiles().length, this.files.length); + } + }; + + TestEval.prototype.start = function (callback) { + this.timer.start(); + + var tsFiles = this.fileHandler.allTS(); + + var it = new Iterator(tsFiles); + + var len = 0; + var maxLen = 76; + + if (it.hasNext()) { + this.run(it, it.next(), len, maxLen, callback); + } + }; + return TestEval; + })(); + + var TestRunner = (function () { + function TestRunner(dtPath) { + this.dtPath = dtPath; + this.typings = []; + this.fh = new FileHandler(dtPath, /.\.ts/g); + this.out = new Print('0.9.1.1', this.fh.allTypings().length, this.fh.allTS().length); + this.sc = new SyntaxChecking(this.fh, this.out); + this.te = new TestEval(this.fh, this.out); + + var tpgs = this.fh.allTypings(); + for (var i = 0; i < tpgs.length; i++) { + this.typings.push(new Typing(tpgs[i], this.dtPath)); + } + } + TestRunner.prototype.printTypingsWithoutTest = function () { + var count = 0; + + if (this.typings.length > 0) { + this.out.printDiv(); + + this.out.printTypingsWithoutTestsMessage(); + + this.out.printDiv(); + + for (var i = 0; i < this.typings.length; i++) { + var typing = this.typings[i]; + if (typing.fileHandler.allTests().length == 0) { + if (typing.name != '_infrastructure' && typing.name != '_ReSharper.DefinitelyTyped' && typing.name != 'obj' && typing.name != 'bin' && typing.name != 'Properties') { + this.out.printTypingsWithoutTest(typing.name); + count++; + } + } + } + } + + return count; + }; + + TestRunner.prototype.run = function () { + var _this = this; + var timer = new Timer(); + timer.start(); + + this.out.printHeader(); + this.out.printSyntaxChecking(); + + this.sc.start(function (syntaxFailedCount, syntaxTotal) { + _this.out.printTypingTests(); + _this.te.start(function (testFailedCount, testTotal) { + var total = _this.printTypingsWithoutTest(); + + timer.end(); + + _this.out.printDiv(); + _this.out.printTotalMessage(); + _this.out.printDiv(); + + _this.out.printElapsedTime(timer.asString, timer.time); + _this.out.printSyntaxErrorCount(syntaxFailedCount, syntaxTotal); + _this.out.printTestErrorCount(testFailedCount, testTotal); + _this.out.printWithoutTestCount(total, _this.fh.allTypings().length); + + _this.out.printDiv(); + + if (syntaxFailedCount > 0 || testFailedCount > 0) { + process.exit(1); + } + }); + }); + }; + return TestRunner; + })(); + TestManager.TestRunner = TestRunner; + })(DefinitelyTyped.TestManager || (DefinitelyTyped.TestManager = {})); + var TestManager = DefinitelyTyped.TestManager; +})(DefinitelyTyped || (DefinitelyTyped = {})); + +var dtPath = __dirname + '/../..'; + +var runner = new DefinitelyTyped.TestManager.TestRunner(dtPath); +runner.run(); diff --git a/_infrastructure/tests/runner.ts b/_infrastructure/tests/runner.ts index e7bf92926..c3d2a9da4 100644 --- a/_infrastructure/tests/runner.ts +++ b/_infrastructure/tests/runner.ts @@ -145,7 +145,7 @@ module DefinitelyTyped { public printHeader() { this.out('=============================================================================\n'); - this.out(' \33[36m\33[1mDefinitelyTyped test runner 0.2.1\33[0m\n'); + this.out(' \33[36m\33[1mDefinitelyTyped test runner 0.3.0\33[0m\n'); this.out('=============================================================================\n'); this.out(' \33[36m\33[1mTypescript version:\33[0m ' + this.version + '\n'); this.out(' \33[36m\33[1mTypings :\33[0m ' + this.typings + '\n'); @@ -508,7 +508,7 @@ module DefinitelyTyped { constructor(public dtPath: string) { this.fh = new FileHandler(dtPath, /.\.ts/g); - this.out = new Print('0.9.1.0', this.fh.allTypings().length, this.fh.allTS().length); + this.out = new Print('0.9.1.1', this.fh.allTypings().length, this.fh.allTS().length); this.sc = new SyntaxChecking(this.fh, this.out); this.te = new TestEval(this.fh, this.out); From fd5bbd611be280d98cc5868b077094a90789bd7a Mon Sep 17 00:00:00 2001 From: andrei-markeev Date: Sun, 25 Aug 2013 05:57:14 +0300 Subject: [PATCH 12/12] CamlJs library --- camljs/camljs-tests.d.ts | 53 ++++++ camljs/camljs.d.ts | 349 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 402 insertions(+) create mode 100644 camljs/camljs-tests.d.ts create mode 100644 camljs/camljs.d.ts diff --git a/camljs/camljs-tests.d.ts b/camljs/camljs-tests.d.ts new file mode 100644 index 000000000..ea3c432e6 --- /dev/null +++ b/camljs/camljs-tests.d.ts @@ -0,0 +1,53 @@ +var caml = new CamlBuilder().Where() + .Any( + CamlBuilder.Expression().TextField("Email").EqualTo("support@google.com"), + CamlBuilder.Expression().TextField("Email").EqualTo("plus@google.com"), + CamlBuilder.Expression().TextField("Title").BeginsWith("[Google]"), + CamlBuilder.Expression().TextField("Content").Contains("Google") + ) + .ToString(); + + +var caml = new CamlBuilder().Where() + .UserField("AssignedTo").EqualToCurrentUser() + .Or() + .UserField("AssignedTo").Membership.CurrentUserGroups() + .GroupBy("Category") + .OrderBy("Priority").ThenBy("Title") + .ToString(); + +var caml = new CamlBuilder().Where() + .All( + CamlBuilder.Expression().All( + CamlBuilder.Expression().BooleanField("Enabled").IsTrue(), + CamlBuilder.Expression().UserMultiField("TargetAudience").EqualTo("55").Or().UserMultiField("TargetAudience").EqualTo("66") + ), + CamlBuilder.Expression().Any( + CamlBuilder.Expression().TextField("NotificationScope").EqualTo("77"), + CamlBuilder.Expression().TextField("NotificationScope").EqualTo("88").And().TextField("ScopeWebRelativeUrl").EqualTo("99") + ) + ) + .ToString(); + +var caml = new CamlBuilder().Where() + .LookupIdField("Category").In([2, 3, 10]) + .And() + .DateField("ExpirationDate").GreaterThan(CamlBuilder.CamlValues.Now) + .OrderBy("ExpirationDate") + .ToString() + + +var caml = new CamlBuilder().Where().CounterField("ID").In([1, 2, 3]).ToString(); + +var caml = CamlBuilder.Expression() + .All( + CamlBuilder.Expression().DateField("BroadcastExpires").GreaterThanOrEqualTo(CamlBuilder.CamlValues.Today), + CamlBuilder.Expression().Any( + CamlBuilder.Expression().UserField("BroadcastTo").IsInCurrentUserGroups(), + CamlBuilder.Expression().UserField("BroadcastTo").EqualToCurrentUser() + ), + CamlBuilder.Expression().DateRangesOverlap(CamlBuilder.DateRangesOverlapType.Year, new Date().toISOString()) + ) + .ToString(); + +var caml = new CamlBuilder().Where().DateTimeField("Created").GreaterThan(new Date(Date.UTC(2013,0,1))).ToString(); diff --git a/camljs/camljs.d.ts b/camljs/camljs.d.ts new file mode 100644 index 000000000..7cfba8a40 --- /dev/null +++ b/camljs/camljs.d.ts @@ -0,0 +1,349 @@ +// Type definitions for camljs +// Project: http://camljs.codeplex.com +// Definitions by: Andrey Markeev +// Definitions: https://github.com/borisyankov/DefinitelyTyped + + +declare module Sys { + class StringBuilder { + /** Appends a string to the string builder */ + public append(s: string): void; + /** Appends a line to the string builder */ + public appendLine(s: string): void; + /** Clears the contents of the string builder */ + public clear(): void; + /** Indicates wherever the string builder is empty */ + public isEmpty(): boolean; + /** Gets the contents of the string builder as a string */ + public toString(): string; + } +} +declare module SP { + /** Defines a writer that provides a set of methods to append text in XML format. Use the static SP.XmlWriter.create(sb) Method to create an SP.XmlWriter object with the Sys.StringBuilder object you pass in. */ + class XmlWriter { + /** Creates a new instance of the XmlWriter class with the specified string builder. */ + static create(sb: Sys.StringBuilder): XmlWriter; + /** Appends a start element tag with the specified name in XML format to the object?s string builder. */ + public writeStartElement(tagName: string): void; + /** Appends an element with the specified tag name and value in XML format to the string builder. */ + public writeElementString(tagName: string, value: string): void; + /** Appends an end element tag in XML format to the object?s string builder. This method appends the end element tag ?/>? if the start element tag is not closed; otherwise, it appends a full end element tag ?? to the string builder. */ + public writeEndElement(): void; + /** Appends an attribute with the specified name and value in XML format to the object?s string builder. */ + public writeAttributeString(localName: string, value: string): void; + /** This method only appends the name of the attribute. You can append the value of the attribute by calling the SP.XmlWriter.writeString(value) Method, and close the attribute by calling the SP.XmlWriter.writeEndAttribute() Method. */ + public writeStartAttribute(localName: string): void; + /** Appends an end of an attribute in XML format to the object?s string builder. */ + public writeEndAttribute(): void; + /** Appends the specified value for an element tag or attribute to the object?s string builder. */ + public writeString(value: string): void; + /** Appends the specified text to the object?s string builder. */ + public writeRaw(xml: string): void; + /** This member is reserved for internal use and is not intended to be used directly from your code. */ + public close(): void; + } +} +declare class CamlBuilder { + constructor(); + public Where(): CamlBuilder.IFieldExpression; + /** Use for: + 1. SPServices CAMLQuery attribute + 2. Creating partial expressions + 3. In conjunction with Any & All clauses + */ + static Expression(): CamlBuilder.IFieldExpression; +} +declare module CamlBuilder { + interface IView { + Query(): IQuery; + } + interface IQuery { + Where(): IFieldExpression; + } + interface IFinalizable { + /** Get the resulting CAML query as string */ + ToString(): string; + } + interface ISortable extends IFinalizable { + /** Adds OrderBy clause to the query + @param fieldInternalName Internal field of the first field by that the data will be sorted (ascending) + @param override This is only necessary for large lists. DON'T use it unless you know what it is for! + @param useIndexForOrderBy This is only necessary for large lists. DON'T use it unless you know what it is for! + */ + OrderBy(fieldInternalName: string, override?: boolean, useIndexForOrderBy?: boolean): ISortedQuery; + /** Adds OrderBy clause to the query (using descending order for the first field). + @param fieldInternalName Internal field of the first field by that the data will be sorted (descending) + @param override This is only necessary for large lists. DON'T use it unless you know what it is for! + @param useIndexForOrderBy This is only necessary for large lists. DON'T use it unless you know what it is for! + */ + OrderByDesc(fieldInternalName: string, override?: boolean, useIndexForOrderBy?: boolean): ISortedQuery; + } + interface IGroupable extends ISortable { + /** Adds GroupBy clause to the query. + @param collapse If true, only information about the groups is retrieved, otherwise items are also retrieved. */ + GroupBy(fieldInternalName): IGroupedQuery; + } + interface IExpression extends IGroupable { + /** Adds And clause to the query. */ + And(): IFieldExpression; + /** Adds Or clause to the query. */ + Or(): IFieldExpression; + } + interface IGroupedQuery extends ISortable { + } + interface ISortedQuery extends IFinalizable { + /** Specifies next order field (ascending) */ + ThenBy(fieldInternalName: string): any; + /** Specifies next order field (descending) */ + ThenByDesc(fieldInternalName: string): any; + } + interface IFieldExpression { + /** Adds And clauses to the query. Use for creating bracket-expressions in conjuction with CamlBuilder.Expression(). */ + All(...conditions: IExpression[]): IExpression; + /** Adds Or clauses to the query. Use for creating bracket-expressions in conjuction with CamlBuilder.Expression(). */ + Any(...conditions: IExpression[]): IExpression; + /** Specifies that a condition will be tested against the field with the specified internal name, and the type of this field is Text */ + TextField(internalName: string): ITextFieldExpression; + /** Specifies that a condition will be tested against the field with the specified internal name, and the type of this field is Boolean */ + BooleanField(internalName: string): IBooleanFieldExpression; + /** Specifies that a condition will be tested against the field with the specified internal name, and the type of this field is URL */ + UrlField(internalName: string): ITextFieldExpression; + /** Specifies that a condition will be tested against the field with the specified internal name, and the type of this field is Number */ + NumberField(internalName: string): INumberFieldExpression; + /** Specifies that a condition will be tested against the field with the specified internal name, and the type of this field is Counter (usually ID fields) */ + CounterField(internalName: string): INumberFieldExpression; + /** Specifies that a condition will be tested against the field with the specified internal name, and the type of this field is Integer */ + IntegerField(internalName: string): INumberFieldExpression; + /** Specifies that a condition will be tested against the field with the specified internal name, and the type of this field is User */ + UserField(internalName: string): IUserFieldExpression; + /** Specifies that a condition will be tested against the field with the specified internal name, and the type of this field is Lookup */ + LookupField(internalName: string): ILookupFieldExpression; + /** DEPRECATED. Please use LookupField(...).Id() instead */ + LookupIdField(internalName: string): INumberFieldExpression; + /** Specifies that a condition will be tested against the field with the specified internal name, and the type of this field is LookupMulti */ + LookupMultiField(internalName: string): ILookupMultiFieldExpression; + /** Specifies that a condition will be tested against the field with the specified internal name, and the type of this field is UserMulti */ + UserMultiField(internalName: string): ILookupMultiFieldExpression; + /** Specifies that a condition will be tested against the field with the specified internal name, and the type of this field is Date */ + DateField(internalName: string): IDateTimeFieldExpression; + /** Specifies that a condition will be tested against the field with the specified internal name, and the type of this field is DateTime */ + DateTimeField(internalName: string): IDateTimeFieldExpression; + /** Used in queries for retrieving recurring calendar events. + NOTICE: DateRangesOverlap with overlapType other than Now cannot be used with SP.CamlQuery, because it doesn't support + CalendarDate and ExpandRecurrence query options. Lists.asmx, however, supports them, so you can still use DateRangesOverlap + with SPServices. + @param overlapType Defines type of overlap: return all events for a day, for a week, for a month or for a year + @param calendarDate Defines date that will be used for determining events for which exactly day/week/month/year will be returned. + This value is ignored for overlapType=Now, but for the other overlap types it is mandatory. + @param eventDateField Internal name of "Start Time" field (default: "EventDate" - all OOTB Calendar lists use this name) + @param endDateField Internal name of "End Time" field (default: "EndDate" - all OOTB Calendar lists use this name) + @param recurrenceIDField Internal name of "Recurrence ID" field (default: "RecurrenceID" - all OOTB Calendar lists use this name) + */ + DateRangesOverlap(overlapType: DateRangesOverlapType, calendarDate: string, eventDateField?: string, endDateField?: string, recurrenceIDField?: string): IExpression; + } + interface IBooleanFieldExpression { + /** Checks whether the value of the field is True */ + IsTrue(): IExpression; + /** Checks whether the value of the field is False */ + IsFalse(): IExpression; + /** Checks whether the value of the field is equal to the specified value */ + EqualTo(value: boolean): IExpression; + /** Checks whether the value of the field is not equal to the specified value */ + NotEqualTo(value: boolean): IExpression; + /** Checks whether the value of the field was specified by user */ + IsNull(): IExpression; + /** Checks whether the value of the field was not specified by user */ + IsNotNull(): IExpression; + } + interface INumberFieldExpression { + /** Checks whether the value of the field is equal to the specified value */ + EqualTo(value: number): IExpression; + /** Checks whether the value of the field is not equal to the specified value */ + NotEqualTo(value: number): IExpression; + /** Checks whether the value of the field is greater than the specified value */ + GreaterThan(value: number): IExpression; + /** Checks whether the value of the field is less than the specified value */ + LessThan(value: number): IExpression; + /** Checks whether the value of the field is greater than or equal to the specified value */ + GreaterThanOrEqualTo(value: number): IExpression; + /** Checks whether the value of the field is less than or equal to the specified value */ + LessThanOrEqualTo(value: number): IExpression; + /** Checks whether the value of the field was specified by user */ + IsNull(): IExpression; + /** Checks whether the value of the field was not specified by user */ + IsNotNull(): IExpression; + /** Checks whether the value of the field is equal to one of the specified values */ + In(arrayOfValues: number[]): IExpression; + } + interface IDateTimeFieldExpression { + /** Checks whether the value of the field was specified by user */ + IsNull(): IExpression; + /** Checks whether the value of the field was not specified by user */ + IsNotNull(): IExpression; + /** Checks whether the value of the field is equal to the specified value */ + EqualTo(value: Date): IExpression; + /** Checks whether the value of the field is not equal to the specified value */ + NotEqualTo(value: Date): IExpression; + /** Checks whether the value of the field is greater than the specified value */ + GreaterThan(value: Date): IExpression; + /** Checks whether the value of the field is less than the specified value */ + LessThan(value: Date): IExpression; + /** Checks whether the value of the field is greater than or equal to the specified value */ + GreaterThanOrEqualTo(value: Date): IExpression; + /** Checks whether the value of the field is less than or equal to the specified value */ + LessThanOrEqualTo(value: Date): IExpression; + /** Checks whether the value of the field is equal to one of the specified values */ + In(arrayOfValues: Date[]): IExpression; + /** Checks whether the value of the field is equal to the specified value. + The datetime value should be defined in ISO 8601 format! */ + EqualTo(value: string): IExpression; + /** Checks whether the value of the field is not equal to the specified value. + The datetime value should be defined in ISO 8601 format! */ + NotEqualTo(value: string): IExpression; + /** Checks whether the value of the field is greater than the specified value. + The datetime value should be defined in ISO 8601 format! */ + GreaterThan(value: string): IExpression; + /** Checks whether the value of the field is less than the specified value. + The datetime value should be defined in ISO 8601 format! */ + LessThan(value: string): IExpression; + /** Checks whether the value of the field is greater than or equal to the specified value. + The datetime value should be defined in ISO 8601 format! */ + GreaterThanOrEqualTo(value: string): IExpression; + /** Checks whether the value of the field is less than or equal to the specified value. + The datetime value should be defined in ISO 8601 format! */ + LessThanOrEqualTo(value: string): IExpression; + /** Checks whether the value of the field is equal to one of the specified values. + The datetime value should be defined in ISO 8601 format! */ + In(arrayOfValues: string[]): IExpression; + } + interface ITextFieldExpression { + /** Checks whether the value of the field is equal to the specified value */ + EqualTo(value: string): IExpression; + /** Checks whether the value of the field is not equal to the specified value */ + NotEqualTo(value: string): IExpression; + /** Checks whether the value of the field contains the specified substring */ + Contains(value: string): IExpression; + /** Checks whether the value of the field begins with the specified substring */ + BeginsWith(value: string): IExpression; + /** Checks whether the value of the field was specified by user */ + IsNull(): IExpression; + /** Checks whether the value of the field was not specified by user */ + IsNotNull(): IExpression; + /** Checks whether the value of the field is equal to one of the specified values */ + In(arrayOfValues: string[]): IExpression; + } + interface IUserFieldExpression { + /** DEPRECATED. Please use IsIn* methods instead. This property will be removed in next release(!!) */ + Membership: IMembership; + /** Checks whether the value of the User field is equal to id of the current user */ + EqualToCurrentUser(): IExpression; + /** Checks whether the group specified by the value of the field includes the current user. */ + IsInCurrentUserGroups(): IExpression; + /** Checks whether the user specified by the value of the field is member of the specified SharePoint Group. */ + IsInSPGroup(groupId: number): IExpression; + /** Checks whether the user specified by the value of the field is member of current SPWeb groups. */ + IsInSPWebGroups(): IExpression; + /** Checks whether the user specified by the value of the field is in current SPWeb users. */ + IsInSPWebAllUsers(): IExpression; + /** Checks whether the user specified by the value of the field has received the rights to the site directly (not through a group). */ + IsInSPWebUsers(): IExpression; + /** Specifies that id of the user will be used for further comparisons. */ + Id(): INumberFieldExpression; + /** Specifies that lookup target field value will be used for further comparisons. */ + ValueAsText(): ITextFieldExpression; + } + /** DEPRECATED!! Please use UserField(...).IsIn* methods instead. This interface will be removed in the next release */ + interface IMembership { + /** DEPRECATED. Please use UserField(...).IsInCurrentUserGroups() instead */ + CurrentUserGroups(): IExpression; + /** DEPRECATED. Please use UserField(...).IsInSPGroup() instead */ + SPGroup(groupId: number): IExpression; + /** DEPRECATED. Please use UserField(...).IsInSPWeb* methods instead */ + SPWeb: IMembershipSPWeb; + } + /** DEPRECATED!! Please use UserField(...).IsInSPWeb* methods instead. This interface will be removed in the next release */ + interface IMembershipSPWeb { + /** DEPRECATED. Please use UserField(...).IsInSPWebAllUsers() instead */ + AllUsers(): IExpression; + /** DEPRECATED. Please use UserField(...).IsInSPWebUsers() instead */ + Users(): IExpression; + /** DEPRECATED. Please use UserField(...).IsInSPWebGroups() instead */ + Groups(): IExpression; + } + interface ILookupFieldExpression { + /** Specifies that lookup id value will be used. */ + Id(): INumberFieldExpression; + /** Specifies that lookup value will be used and this value is of type Text */ + ValueAsText(): ITextFieldExpression; + /** Specifies that lookup value will be used and this value is of type Number */ + ValueAsNumber(): INumberFieldExpression; + /** Specifies that lookup value will be used and this value is of type Date */ + ValueAsDate(): IDateTimeFieldExpression; + /** Specifies that lookup value will be used and this value is of type DateTime */ + ValueAsDateTime(): IDateTimeFieldExpression; + /** Specifies that lookup value will be used and this value is of type Boolean */ + ValueAsBoolean(): IBooleanFieldExpression; + } + interface ILookupMultiFieldExpression { + /** Checks whether the value of the field is equal to the specified value */ + EqualTo(value: string): IExpression; + /** Checks whether the value of the field is not equal to the specified value */ + NotEqualTo(value: string): IExpression; + /** Checks whether the values of the field includes the specified value */ + Includes(value): IExpression; + /** Checks whether the values of the field not includes the specified value */ + NotIncludes(value): IExpression; + } + enum DateRangesOverlapType { + /** Returns events for today */ + Now, + /** Returns events for one day, specified by CalendarDate in QueryOptions */ + Day, + /** Returns events for one week, specified by CalendarDate in QueryOptions */ + Week, + /** Returns events for one month, specified by CalendarDate in QueryOptions. + Caution: usually also returns few days from previous and next months */ + Month, + /** Returns events for one year, specified by CalendarDate in QueryOptions */ + Year, + } + class Internal { + static createView(): IView; + static createWhere(): IFieldExpression; + static createExpression(): IFieldExpression; + } + class CamlValues { + /** Dynamic value that represents Id of the current user */ + static UserID: string; + /** Dynamic value that represents current date */ + static Today: string; + /** Dynamic value that represents current date with specified offset (may be negative) */ + static TodayWithOffset(offsetDays: number): string; + static Now: string; + /** Dynamic value that represents a property of the current list */ + static ListProperty: { + Created: string; + DefaultViewUrl: string; + Description: string; + EnableSyndication: string; + ItemCount: string; + LinkTitle: string; + MajorVersionLimit: string; + MajorWithMinorVersionsLimit: string; + RelativeFolderPath: string; + Title: string; + ViewSelector: string; + }; + /** Dynamic value that represents a property of the current SPWeb */ + static ProjectProperty: { + BlogCategoryTitle: string; + BlogPostTitle: string; + Description: string; + RecycleBinEnabled: string; + SiteOwnerName: string; + SiteUrl: string; + Title: string; + Url: string; + }; + } +}