Skip to content

Commit 6feeb14

Browse files
committed
Fixing type errors in tests
1 parent 745388c commit 6feeb14

File tree

313 files changed

+1690
-1655
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

313 files changed

+1690
-1655
lines changed

CodingConvention.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ Sometimes we need to explicitly check for a type. In such cases use the built-in
696696

697697
*Right:*
698698
~~~ {.javascript}
699-
import types = require("utils/types");
699+
import * as types from "utils/types";
700700
var myVar;
701701
702702
if(types.isString(myVar)) {

CreateNewModule.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ declare module "foo"{
2424
**Implementation file (foo.ts):**
2525

2626
```javascript
27-
import definition = require("foo");
27+
import * as definition from "foo";
2828

2929
export function a(){
3030
// do somethign here
@@ -53,7 +53,7 @@ declare module "foo"{
5353
**Android implementation file (foo.android.ts):**
5454

5555
```javascript
56-
import definition = require("foo");
56+
import * as definition from "foo";
5757

5858
// require the definition and put implements clause to ensure API consistency between the declaration and implementation
5959
export class Foo implements definition.Foo {
@@ -72,7 +72,7 @@ export class Foo implements definition.Foo {
7272
**iOS implementation file (foo.ios.ts):**
7373

7474
```javascript
75-
import definition = require("foo");
75+
import * as definition from "foo";
7676

7777
// require the definition and put implements clause to ensure API consistency between the declaration and implementation
7878
export class Foo implements definition.Foo {
@@ -109,7 +109,7 @@ declare module "foo"{
109109
**Common implementation file (foo-common.ts):**
110110

111111
```javascript
112-
import definition = require("foo");
112+
import * as definition from "foo";
113113

114114
// require the definition and put implements clause to ensure API consistency between the declaration and implementation
115115
export class Foo implements definition.Foo {
@@ -128,7 +128,7 @@ export class Foo implements definition.Foo {
128128
**Android implementation file (foo.android.ts):**
129129

130130
```javascript
131-
import common = require("foo-common");
131+
import * as common from "foo-common";
132132

133133
// require the common file and extend the base common implementation
134134
export class Foo extends common.Foo {
@@ -148,7 +148,7 @@ export class Foo extends common.Foo {
148148
**iOS implementation file (foo.ios.ts):**
149149

150150
```javascript
151-
import common = require("foo-common");
151+
import * as common from "foo-common";
152152

153153
// require the common file and extend the base common implementation
154154
export class Foo extends common.Foo {
@@ -215,8 +215,8 @@ export function stopNative(){
215215
**Common implementation file (foo.ts):**
216216
217217
```javascript
218-
import definition = require("foo");
219-
import fooNative = require("foo-native");
218+
import * as definition from "foo";
219+
import * as fooNative from "foo-native";
220220

221221
// require the definition and put implements clause to ensure API consistency between the declaration and implementation
222222
export class Foo implements definition.Foo {

apps/app/css-perf-test/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import application = require("application");
1+
import * as application from "application";
22
declare var CACurrentMediaTime;
33

44
global.time = function(): number {

apps/app/cuteness.io/app.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import application = require("application");
2-
import fps = require("fps-meter");
1+
import * as application from "application";
2+
import * as fps from "fps-meter";
33
fps.addCallback(function (fps, minFps) {
44
console.info("fps=" + fps + " minFps=" + minFps);
55
});

apps/app/gallery-app/app.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import application = require("application");
1+
import * as application from "application";
22

33
// Needed only for build infrastructure
4-
application.cssFile = "gallery-app/app.css";
4+
application.setCssFileName("gallery-app/app.css");
55

66
application.start({ moduleName: "gallery-app/main-page" });

apps/app/gallery-app/main-page.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import observable = require("data/observable");
2-
import frame = require("ui/frame");
1+
import * as observable from "data/observable";
2+
import * as frame from "ui/frame";
33

44
export function itemTap(args: observable.EventData) {
55
frame.topmost().navigate({

apps/app/gallery-app/views/dialogs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import dialogs = require("ui/dialogs");
1+
import * as dialogs from "ui/dialogs";
22

33
export function alertTapped(args) {
44
dialogs.alert("Hi there!");

apps/app/gallery-app/views/list-picker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import pages = require("ui/page");
2-
import observableModule = require("data/observable");
1+
import * as pages from "ui/page";
2+
import * as observableModule from "data/observable";
33

44
export function onPageLoaded(args: observableModule.EventData) {
55
var page = <pages.Page>args.object;

apps/app/ui-tests-app/action-bar/action-item-position.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { EventData } from "data/observable";
22
import { Page } from "ui/page";
3-
import observable = require("data/observable");
3+
import * as observable from "data/observable";
44

55
export function navigatingTo(args: EventData) {
66
let page = <Page>args.object;

apps/app/ui-tests-app/action-bar/action-view.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import frame = require("ui/frame");
1+
import * as frame from "ui/frame";
22

33
export function navigate(args) {
44
frame.topmost().navigate("ui-tests-app/action-bar/clean");

0 commit comments

Comments
 (0)