diff --git a/alt/alt-tests.ts b/alt/alt-tests.ts index 1941b4071..fad079b02 100644 --- a/alt/alt-tests.ts +++ b/alt/alt-tests.ts @@ -41,8 +41,8 @@ class AbstractStoreModel implements AltJS.StoreModel { class GenerateActionsClass extends AbstractActions { constructor(config:AltJS.Alt) { - this.generateActions("notifyTest"); super(config); + this.generateActions("notifyTest"); } } diff --git a/backbone-associations/backbone-associations-tests.ts b/backbone-associations/backbone-associations-tests.ts index d25ddf17e..5f656b8f2 100644 --- a/backbone-associations/backbone-associations-tests.ts +++ b/backbone-associations/backbone-associations-tests.ts @@ -7,6 +7,7 @@ module Backbone.Associations.Tests { module OneToOne { class EmployeeWithManager extends Backbone.AssociatedModel { constructor(options?) { + super(options); this.relations = [ { type: Backbone.One, //nature of the relationship @@ -14,7 +15,6 @@ module Backbone.Associations.Tests { relatedModel: 'Employee' //AssociatedModel for attribute key } ]; - super(options); } defaults() { @@ -48,6 +48,7 @@ module Backbone.Associations.Tests { class Project extends Backbone.AssociatedModel { constructor(options?) { + super(options); this.relations = [ { type: Backbone.Many, //nature of the relation @@ -56,7 +57,6 @@ module Backbone.Associations.Tests { relatedModel: Location //Optional } ]; - super(options); } defaults() { diff --git a/backbone/backbone-tests.ts b/backbone/backbone-tests.ts index 017546642..4f719f92b 100644 --- a/backbone/backbone-tests.ts +++ b/backbone/backbone-tests.ts @@ -29,11 +29,11 @@ class SettingDefaults extends Backbone.Model { } constructor(attributes?: any, options?: any) { + super(attributes, options); // error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. this.defaults = { name: "Joe" } // super has to come last - super(attributes, options); } // or set it like this diff --git a/backbone/backbone-with-lodash-tests.ts b/backbone/backbone-with-lodash-tests.ts index 0138b2603..001882ca0 100644 --- a/backbone/backbone-with-lodash-tests.ts +++ b/backbone/backbone-with-lodash-tests.ts @@ -30,11 +30,11 @@ class SettingDefaults extends Backbone.Model { } constructor(attributes?: any, options?: any) { + super(attributes, options); // TODO error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. this.defaults = { name: "Joe" } // super has to come last - super(attributes, options); } // or set it like this diff --git a/backgrid/backgrid-tests.ts b/backgrid/backgrid-tests.ts index a29a4ae7e..f2a41a558 100644 --- a/backgrid/backgrid-tests.ts +++ b/backgrid/backgrid-tests.ts @@ -26,8 +26,8 @@ class TestModel extends Backbone.Model { class TestCollection extends Backbone.Collection { constructor(models?: any, options?: any) { - this.model = TestModel; super(models, options); + this.model = TestModel; } initialize() { @@ -46,6 +46,7 @@ class TestView extends Backbone.View { testCollection: TestCollection; constructor(viewOptions?: Backbone.ViewOptions) { + super(viewOptions); this.testCollection = new TestCollection(); this.gridView = new Backgrid.Grid({ columns: [new Backgrid.Column({name: "FirstName", cell: "string", label: "First Name"}), @@ -54,7 +55,6 @@ class TestView extends Backbone.View { collection:this.testCollection, }); - super(viewOptions); } diff --git a/baconjs/baconjs-tests.ts b/baconjs/baconjs-tests.ts index 9557e37cd..ab5b67180 100644 --- a/baconjs/baconjs-tests.ts +++ b/baconjs/baconjs-tests.ts @@ -75,7 +75,7 @@ function CreatingStreams() { var stream = Bacon.fromBinder(sink => { sink("first value"); sink([new Bacon.Next("2nd"), new Bacon.Next("3rd")]); - sink(new Bacon.Next(() => { + sink(new Bacon.Next((): string => { return "This one will be evaluated lazily" })); sink(new Bacon.Error("oops, an error")); @@ -88,7 +88,7 @@ function CreatingStreams() { } new Bacon.Next("value"); - new Bacon.Next(() => "value"); + new Bacon.Next((): string => "value"); } function CommonMethodsInEventStreamsAndProperties() { @@ -296,7 +296,7 @@ function CombiningMultipleStreamsAndProperties() { function $Event() { new Bacon.Next("value"); - new Bacon.Next(() => "value"); + new Bacon.Next((): string => "value"); } function Errors() { diff --git a/cryptojs/all-tests.ts.tscparams b/cryptojs/all-tests.ts.tscparams new file mode 100644 index 000000000..e5e9ee152 --- /dev/null +++ b/cryptojs/all-tests.ts.tscparams @@ -0,0 +1 @@ +--target es5 --noImplicitAny \ No newline at end of file diff --git a/cryptojs/test/lib-typedarrays-tests.ts.tscparams b/cryptojs/test/lib-typedarrays-tests.ts.tscparams new file mode 100644 index 000000000..e5e9ee152 --- /dev/null +++ b/cryptojs/test/lib-typedarrays-tests.ts.tscparams @@ -0,0 +1 @@ +--target es5 --noImplicitAny \ No newline at end of file diff --git a/giraffe/giraffe-tests.ts b/giraffe/giraffe-tests.ts index 4cd6694da..ec6cb0c62 100644 --- a/giraffe/giraffe-tests.ts +++ b/giraffe/giraffe-tests.ts @@ -6,10 +6,10 @@ class User extends Giraffe.Model { class MainView extends Giraffe.View { constructor(options?) { + super(options); this.appEvents = { 'startup': 'app_onStartup' } - super(options); } app_onStartup() { @@ -20,10 +20,10 @@ class MainView extends Giraffe.View { class MyApp extends Giraffe.App { constructor() { + super(); this.routes= { '': 'home' } - super(); } home() { diff --git a/marionette/marionette-tests.ts b/marionette/marionette-tests.ts index 411ddc9b6..90b1d690e 100644 --- a/marionette/marionette-tests.ts +++ b/marionette/marionette-tests.ts @@ -114,6 +114,8 @@ module Marionette.Tests { behaviors: any; constructor(model: MyModel) { + super({ model: model }); + this.ui = { destroy: '.destroy' }; @@ -123,9 +125,6 @@ module Marionette.Tests { message: 'hello' } }; - - super({ model: model }); - } template() { @@ -136,8 +135,8 @@ module Marionette.Tests { class MainRegion extends Marionette.Region { constructor() { - this.el = '#main'; super(); + this.el = '#main'; } } @@ -147,13 +146,13 @@ module Marionette.Tests { options: any; constructor() { + super(); this.name = 'Adam'; this.options = { name: 'Foo' }; - super(); this.on("before:destroy", () => { console.log("before:destroy"); }); @@ -166,27 +165,28 @@ module Marionette.Tests { class MyRegion extends Marionette.Region { constructor() { - this.el = '#main-nav'; super(); + this.el = '#main-nav'; } } class MyJQueryRegion extends Marionette.Region { constructor() { - this.el = $('#main-nav'); super(); + this.el = $('#main-nav'); } } class MyHtmlElRegion extends Marionette.Region { constructor() { - this.el = document.querySelector("body"); super(); + this.el = document.querySelector("body"); } } class MyCollectionView extends Marionette.CollectionView { constructor() { + super(); this.childView = MyView; this.childEvents = { render: function () { @@ -208,8 +208,6 @@ module Marionette.Tests { this.childViewEventPrefix = "some:prefix"; - super(); - this.on('some:prefix:render', function () { }); diff --git a/mithril/mithril-tests.ts b/mithril/mithril-tests.ts index 56323c5dd..be5832a40 100644 --- a/mithril/mithril-tests.ts +++ b/mithril/mithril-tests.ts @@ -34,15 +34,15 @@ var todo = { view: function(ctrl: any) { return m("html", [ m("body", [ - m("input", {onchange: m.withAttr("value", ctrl.description), value: ctrl.description()}), - m("button", {onclick: ctrl.add}, "Add"), + m("input", {onchange: m.withAttr("value", ctrl.description), value: ctrl.description()} as any /* TODO remove `as any` */), + m("button", {onclick: ctrl.add} as any /* TODO remove `as any` */, "Add"), m("table", [ ctrl.list.map(function(task: any) { return m("tr", [ m("td", [ - m("input[type=checkbox]", {onclick: m.withAttr("checked", task.done), checked: task.done()}) + m("input[type=checkbox]", {onclick: m.withAttr("checked", task.done), checked: task.done()} as any /* TODO remove `as any` */) ]), - m("td", {style: {textDecoration: task.done() ? "line-through" : "none"}}, task.description()), + m("td", {style: {textDecoration: task.done() ? "line-through" : "none"}} as any /* TODO remove `as any` */, task.description()), ]) }) ]) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 84c9e4c7c..27f9731d7 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,5 +1,5 @@ { - "name": "DefinitelyTyped", + "name": "definitely-typed", "version": "0.0.1", "dependencies": { "assertion-error": { @@ -13,14 +13,14 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.3.0.tgz" }, "bluebird": { - "version": "3.2.2", - "from": "bluebird@>=3.1.2 <4.0.0", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.2.2.tgz" + "version": "3.3.1", + "from": "bluebird@>=3.3.1 <4.0.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.3.1.tgz" }, "brace-expansion": { - "version": "1.1.2", + "version": "1.1.3", "from": "brace-expansion@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.2.tgz" + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.3.tgz" }, "concat-map": { "version": "0.0.1", @@ -38,8 +38,8 @@ "resolved": "https://registry.npmjs.org/definition-header/-/definition-header-0.3.0.tgz" }, "definition-tester": { - "version": "0.5.0", - "from": "definition-tester@0.5.0" + "version": "0.5.1", + "from": "definition-tester@0.5.1" }, "findup-sync": { "version": "0.3.0", @@ -59,9 +59,9 @@ "resolved": "https://registry.npmjs.org/git-wrapper/-/git-wrapper-0.1.1.tgz" }, "glob": { - "version": "6.0.4", - "from": "glob@>=6.0.4 <7.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz" + "version": "7.0.0", + "from": "glob@>=7.0.0 <8.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.0.tgz" }, "hoek": { "version": "3.0.4", @@ -89,9 +89,9 @@ "resolved": "https://registry.npmjs.org/isemail/-/isemail-2.1.0.tgz" }, "joi": { - "version": "7.2.3", + "version": "7.3.0", "from": "joi@>=7.2.2 <8.0.0", - "resolved": "https://registry.npmjs.org/joi/-/joi-7.2.3.tgz" + "resolved": "https://registry.npmjs.org/joi/-/joi-7.3.0.tgz" }, "joi-assert": { "version": "0.0.3", @@ -196,9 +196,9 @@ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.2.tgz" }, "typescript": { - "version": "1.7.5", - "from": "typescript@1.7.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-1.7.5.tgz" + "version": "1.8.2", + "from": "typescript@1.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-1.8.2.tgz" }, "wordwrap": { "version": "0.0.3", diff --git a/oclazyload/oclazyload-tests.ts b/oclazyload/oclazyload-tests.ts index d3d3d6b11..3a436b14a 100644 --- a/oclazyload/oclazyload-tests.ts +++ b/oclazyload/oclazyload-tests.ts @@ -41,7 +41,7 @@ angular.module('app').controller(['$ocLazyLoadProvider', function ($ocLazyLoad: 'bower_components/bootstrap/dist/js/bootstrap.js' ], cache: false, - kjdf: false + // kjdf: false }, { files: ['anotherModule.js'], diff --git a/package.json b/package.json index 40a1b3e8a..b2eb7c02f 100644 --- a/package.json +++ b/package.json @@ -1,20 +1,15 @@ { "private": true, - "name": "DefinitelyTyped", + "name": "definitely-typed", "version": "0.0.1", - "homepage": "https://github.com/borisyankov/DefinitelyTyped", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped", "repository": { "type": "git", - "url": "https://github.com/borisyankov/DefinitelyTyped.git" + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" }, - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/borisyankov/DefinitelyTyped/blob/master/LICENSE" - } - ], + "license": "MIT", "bugs": { - "url": "https://github.com/borisyankov/DefinitelyTyped/issues" + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" }, "engines": { "node": ">= 0.12.0" @@ -32,10 +27,9 @@ "refmap": "dt --dry --print-refmap", "help": "dt -h" }, - "dependencies": { - }, + "dependencies": {}, "devDependencies": { - "definition-tester": "0.5.0", - "typescript": "1.7.5" + "definition-tester": "0.5.1", + "typescript": "1.8.2" } } diff --git a/sequelize/sequelize-tests.ts b/sequelize/sequelize-tests.ts index b7a04761f..3800f2ae2 100644 --- a/sequelize/sequelize-tests.ts +++ b/sequelize/sequelize-tests.ts @@ -1300,7 +1300,7 @@ s.define( 'ProductWithSettersAndGetters2', { s.define( 'post', { title : Sequelize.STRING, authorId : { type : Sequelize.INTEGER, references : testModel, referencesKey : 'id' } -} ); +} as any /* TODO please remove `as any` */); s.define( 'post', { title : Sequelize.STRING, authorId : { type : Sequelize.INTEGER, references : { model : testModel, key : 'id' } } diff --git a/sharepoint/SharePoint-tests.ts b/sharepoint/SharePoint-tests.ts index 5b73493b3..271f74fed 100644 --- a/sharepoint/SharePoint-tests.ts +++ b/sharepoint/SharePoint-tests.ts @@ -995,7 +995,7 @@ module CSR { function GetCurrentLookupValue() { if (_dropdownElt == null) return ''; - return _dropdownElt.value == '0' || _dropdownElt.value == '' ? '' : _dropdownElt.value + ';#' + _dropdownElt.options[_dropdownElt.selectedIndex].text; + return _dropdownElt.value == '0' || _dropdownElt.value == '' ? '' : _dropdownElt.value + ';#' + (_dropdownElt.options[_dropdownElt.selectedIndex] as any /* TODO remove `as any` */).text; } function stripBraces(input: string): string { @@ -1093,12 +1093,12 @@ module CSR { var selected = false; while (_dropdownElt.options.length) { - _dropdownElt.options.remove(0); + (_dropdownElt.options as any /* TODO remove `as any` */).remove(0); } if (!_schema.Required) { var defaultOpt = new Option(Strings.STS.L_LookupFieldNoneOption, '0', selected, selected); - _dropdownElt.options.add(defaultOpt); + (_dropdownElt.options as any /* TODO remove `as any` */).add(defaultOpt); selected = _selectedValue == 0; } var isEmptyList = true; @@ -1122,7 +1122,7 @@ module CSR { selected = true; } var opt = new Option(text, id.toString(), isSelected, isSelected); - _dropdownElt.options.add(opt); + (_dropdownElt.options as any /* TODO remove `as any` */).add(opt); isEmptyList = false; } pendingLoads--; diff --git a/vso-node-api/vso-node-api-tests.ts b/vso-node-api/vso-node-api-tests.ts index b2c188047..3e0d4f977 100644 --- a/vso-node-api/vso-node-api-tests.ts +++ b/vso-node-api/vso-node-api-tests.ts @@ -47,10 +47,10 @@ function test_apis() { var apis: basem.ClientApiBase[] = [buildapi, coreapi, filecontainerapi, galleryapi, gitapi, taskapi, agentapi, testapi, tfvcapi, witapi]; var qapis: basem.QClientApiBase[] = [qbuildapi, qcoreapi, qfilecontainerapi, qgalleryapi, qgitapi, qtaskapi, qagentapi, qtestapi, qtfvcapi, qwitapi]; - for(var api in apis) { + for(var api of apis) { console.log('API user agent name: ' + api.userAgent); } - for(var qapi in qapis) { + for(var qapi of qapis) { console.log('Q API user agent name: ' + qapi.api.userAgent); } } diff --git a/xdate/xdate-tests.ts b/xdate/xdate-tests.ts index dad175104..a395c141e 100644 --- a/xdate/xdate-tests.ts +++ b/xdate/xdate-tests.ts @@ -261,7 +261,7 @@ module XDate_Test //var xdate = new XDate(YEAR, MONTH, DATE, true); var xdate = new XDate(YEAR, MONTH, DATE); xdate.setUTCMode(true); - return xdate.getUTCMode() + return xdate.getUTCMode() && xdate.getFullYear() == YEAR && xdate.getMonth() == MONTH && xdate.getDate() == DATE && diff --git a/yfiles/yfiles-tests.ts b/yfiles/yfiles-tests.ts index 0bc89557b..c19c823eb 100644 --- a/yfiles/yfiles-tests.ts +++ b/yfiles/yfiles-tests.ts @@ -139,6 +139,9 @@ module yfilesTest { } class MyNodeStyle extends yfiles.drawing.SimpleAbstractNodeStyle { + constructor() { + super(null); + } createVisual(node:yfiles.graph.INode, renderContext:yfiles.drawing.IRenderContext):yfiles.drawing.RectVisual { return new yfiles.drawing.RectVisual.FromRectangle(new yfiles.geometry.Rectangle(0, 0, 10, 10)); }