diff --git a/dom4/index.d.ts b/dom4/index.d.ts index 5c6538e5b3..95cabbd4d3 100644 --- a/dom4/index.d.ts +++ b/dom4/index.d.ts @@ -7,7 +7,7 @@ interface ParentNode { /** * Returns the child elements. */ - children: HTMLCollection; + readonly children: HTMLCollection; /** * Returns the first element that is a descendant of node that matches relativeSelectors. diff --git a/history/index.d.ts b/history/index.d.ts index 51ad48e18c..ee2156d455 100644 --- a/history/index.d.ts +++ b/history/index.d.ts @@ -55,8 +55,6 @@ export type HistoryOptions = { current?: number; } -export type Href = string - export type Location = { pathname: Pathname; search: Search; @@ -74,18 +72,31 @@ export type LocationDescriptorObject = { state?: LocationState; }; -export type LocationDescriptor = LocationDescriptorObject | Path; -export type LocationKey = string; -export type LocationListener = (location: Location) => void; -export type LocationState = Object; -export type Path = string // Pathname + QueryString; -export type Pathname = string; -export type Query = Object; -export type QueryString = string; -export type Search = string; - -export type TransitionHook = (location: Location, callback: (result: any) => void) => any - +export namespace History { + export type LocationDescriptor = LocationDescriptorObject | Path; + export type LocationKey = string; + export type LocationListener = (location: Location) => void; + export type LocationState = Object; + export type Path = string // Pathname + QueryString; + export type Pathname = string; + export type Query = Object; + export type QueryString = string; + export type Search = string; + export type TransitionHook = (location: Location, callback: (result: any) => void) => any + export type Href = string; +} +// Back-compat aliases +export type LocationDescriptor = History.LocationDescriptor; +export type LocationKey = History.LocationKey; +export type LocationListener = History.LocationListener; +export type LocationState = History.LocationState; +export type Path = History.Path; +export type Pathname = History.Pathname; +export type Query = History.Query; +export type QueryString = History.QueryString; +export type Search = History.Search; +export type TransitionHook = History.TransitionHook; +export type Href = History.Href; export interface HistoryBeforeUnload { listenBeforeUnload(hook: BeforeUnloadHook): () => void; diff --git a/knockout/tests/knockout-tests.ts b/knockout/tests/knockout-tests.ts index 8c8fc61b1d..cea71e4821 100644 --- a/knockout/tests/knockout-tests.ts +++ b/knockout/tests/knockout-tests.ts @@ -343,7 +343,7 @@ function test_more() { this.firstName = ko.observable(first).extend({ required: "Please enter a first name", logChange: "first name" }); var upperCaseName = ko.computed(function () { - return name.toUpperCase(); + return (name as string).toUpperCase(); }).extend({ throttle: 500 }); function AppViewModel3() { diff --git a/leapmotionts/LeapMotionTS-tests.ts b/leapmotionts/LeapMotionTS-tests.ts index 3233a247e5..69512e4a37 100644 --- a/leapmotionts/LeapMotionTS-tests.ts +++ b/leapmotionts/LeapMotionTS-tests.ts @@ -1,4 +1,4 @@ -import Leap = require('leapmotionTS'); +import Leap = require('./'); var controller: Leap.Controller = new Leap.Controller(); controller.addEventListener(Leap.LeapEvent.LEAPMOTION_FRAME, (event: Leap.LeapEvent) => { diff --git a/tinycolor/tinycolor-tests.ts b/tinycolor/tinycolor-tests.ts index f7749fbf5d..b3e0d0769a 100644 --- a/tinycolor/tinycolor-tests.ts +++ b/tinycolor/tinycolor-tests.ts @@ -75,7 +75,7 @@ var rgbString: string = tester.toString(); var percentageRGBA: ColorFormats.RGBA = tester.toPercentageRgb(); var percentageRGBString: string = tester.toPercentageRgbString(); -var name: string = tester.toName(); +var name_: string = tester.toName(); var filter: string = tester.toFilter(); var sString: string = tester.toString(); sString = tester.toString("rgb");