mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
No more ambient modules for tns-core-modules/* subpackages.
- Use path mappings in tsconfig.json to resolve module typings - Only use ambient mobules for global API's - Move single-file modules to a subdir with the same name so that we can provide a hand-written typing next to it (via package.json) - Delete all mentions of tns-core-modules.d.ts - Delete reference d.ts assembly build steps. Not needed anymore. - HACK! Use a <reference> for global typings in application.d.ts to avoid publishing a separate @types/tns-core-modules package. - Rename declarations.d.ts to tns-core-modules.d.ts to preserve JS project mappings in references.d.ts (the only place we use those)
This commit is contained in:
committed by
Hristo Deshev
parent
1af8c6ca8e
commit
b45cbe929b
@@ -1,5 +1,5 @@
|
||||
require("globals");
|
||||
import http = require("http");
|
||||
import * as http from "tns-core-modules/http";
|
||||
|
||||
declare var postMessage : any;
|
||||
|
||||
@@ -7,4 +7,4 @@ http.getString("https://httpbin.org/get").then(function (r) {
|
||||
postMessage(r);
|
||||
}, function (e) {
|
||||
throw e;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* tslint:disable:no-unused-variable */
|
||||
import * as TKUnit from "./TKUnit";
|
||||
import * as http from "http";
|
||||
import * as http from "tns-core-modules/http";
|
||||
import * as types from "utils/types";
|
||||
import * as fs from "file-system";
|
||||
import { addHeader } from "http/http-request";
|
||||
@@ -650,4 +650,4 @@ export var test_getString_WorksProperlyInWorker = function () {
|
||||
}
|
||||
|
||||
TKUnit.waitUntilReady(() => ready);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,13 +3,13 @@ import * as helper from "../ui/helper";
|
||||
import * as platform from "platform";
|
||||
import * as trace from "trace";
|
||||
import { Color } from "color";
|
||||
import { NavigationEntry, NavigationTransition, topmost as topmostFrame, traceEnabled } from "ui/frame";
|
||||
import { NavigationEntry, NavigationTransition, topmost as topmostFrame } from "ui/frame";
|
||||
import { Page } from "ui/page";
|
||||
import { AnimationCurve } from "ui/enums"
|
||||
|
||||
function _testTransition(navigationTransition: NavigationTransition) {
|
||||
var testId = `Transition[${JSON.stringify(navigationTransition)}]`;
|
||||
if (traceEnabled()) {
|
||||
if (trace.isEnabled()) {
|
||||
trace.write(`Testing ${testId}`, trace.categories.Test);
|
||||
}
|
||||
var navigationEntry: NavigationEntry = {
|
||||
|
||||
@@ -4,7 +4,7 @@ import * as stacks from "ui/layouts/stack-layout";
|
||||
import * as scroll from "ui/scroll-view";
|
||||
import * as textView from "ui/text-view";
|
||||
import * as timer from "timer";
|
||||
import * as http from "http";
|
||||
import * as http from "tns-core-modules/http";
|
||||
import * as trace from "trace";
|
||||
trace.enable();
|
||||
trace.setCategories(trace.categories.Style);
|
||||
@@ -63,4 +63,4 @@ export function createPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
//export var Page = page;
|
||||
//export var Page = page;
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as observable from "data/observable";
|
||||
import * as view from "ui/core/view";
|
||||
import * as label from "ui/label";
|
||||
import * as pages from "ui/page";
|
||||
import * as http from "http";
|
||||
import * as http from "tns-core-modules/http";
|
||||
|
||||
var obj = new observable.Observable();
|
||||
obj.set("id", 0);
|
||||
@@ -53,4 +53,4 @@ export function MyPageLoaded(args: observable.EventData) {
|
||||
|
||||
export function setPicture(args: observable.EventData) {
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user