ci: update build to use TypeScript 2.3.2 (#16707)
This commit is contained in:

committed by
Jason Aden

parent
af99cf2a41
commit
9a7f5d580f
@ -456,7 +456,7 @@ class _Visitor implements html.Visitor {
|
||||
0);
|
||||
|
||||
if (significantChildren == 1) {
|
||||
for (let i = this._messages.length - 1; i >= startIndex; i--) {
|
||||
for (let i = this._messages.length - 1; i >= startIndex !; i--) {
|
||||
const ast = this._messages[i].nodes;
|
||||
if (!(ast.length == 1 && ast[0] instanceof i18n.Text)) {
|
||||
this._messages.splice(i, 1);
|
||||
|
@ -669,7 +669,7 @@ class _DuplicateItemRecordList<V> {
|
||||
get(trackById: any, afterIndex: number|null): IterableChangeRecord_<V>|null {
|
||||
let record: IterableChangeRecord_<V>|null;
|
||||
for (record = this._head; record !== null; record = record._nextDup) {
|
||||
if ((afterIndex === null || afterIndex < record.currentIndex) &&
|
||||
if ((afterIndex === null || afterIndex < record.currentIndex !) &&
|
||||
looseIdentical(record.trackById, trackById)) {
|
||||
return record;
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import {Injector, RenderComponentType, RootRenderer, Sanitizer, SecurityContext,
|
||||
import {ArgumentType, BindingFlags, NodeCheckFn, NodeDef, NodeFlags, OutputType, RootData, Services, ViewData, ViewDefinition, ViewFlags, ViewHandleEventFn, ViewState, ViewUpdateFn, anchorDef, asElementData, asProviderData, directiveDef, elementDef, rootRenderNodes, textDef, viewDef} from '@angular/core/src/view/index';
|
||||
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
|
||||
|
||||
import {createRootView, isBrowser, removeNodes} from './helper';
|
||||
import {createRootView, isBrowser, recordNodeToRemove} from './helper';
|
||||
|
||||
export function main() {
|
||||
describe(`Component Views`, () => {
|
||||
@ -56,7 +56,7 @@ export function main() {
|
||||
beforeEach(() => {
|
||||
rootNode = document.createElement('root');
|
||||
document.body.appendChild(rootNode);
|
||||
removeNodes.push(rootNode);
|
||||
recordNodeToRemove(rootNode);
|
||||
});
|
||||
|
||||
it('should select root elements based on a selector', () => {
|
||||
|
@ -12,7 +12,7 @@ import {ArgumentType, BindingFlags, DebugContext, NodeDef, NodeFlags, OutputType
|
||||
import {TestBed} from '@angular/core/testing';
|
||||
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
|
||||
|
||||
import {ARG_TYPE_VALUES, checkNodeInlineOrDynamic, createRootView, isBrowser, removeNodes} from './helper';
|
||||
import {ARG_TYPE_VALUES, checkNodeInlineOrDynamic, createRootView, isBrowser, recordNodeToRemove} from './helper';
|
||||
|
||||
export function main() {
|
||||
describe(`View Elements`, () => {
|
||||
@ -182,7 +182,7 @@ export function main() {
|
||||
// won't work in IE.
|
||||
result.rootNodes.forEach((node) => {
|
||||
document.body.appendChild(node);
|
||||
removeNodes.push(node);
|
||||
recordNodeToRemove(node);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
@ -41,6 +41,11 @@ export function createEmbeddedView(parent: ViewData, anchorDef: NodeDef, context
|
||||
return Services.createEmbeddedView(parent, anchorDef, anchorDef.element !.template !, context);
|
||||
}
|
||||
|
||||
export let removeNodes: Node[];
|
||||
let removeNodes: Node[];
|
||||
|
||||
beforeEach(() => { removeNodes = []; });
|
||||
afterEach(() => { removeNodes.forEach((node) => getDOM().remove(node)); });
|
||||
|
||||
export function recordNodeToRemove(node: Node) {
|
||||
removeNodes.push(node);
|
||||
}
|
@ -334,7 +334,7 @@ export function main() {
|
||||
it('should use FormData body and detect content type header to the request', () => {
|
||||
const body = new FormData();
|
||||
body.append('test1', 'val1');
|
||||
body.append('test2', 123456);
|
||||
body.append('test2', '123456');
|
||||
const blob = createBlob(['body { color: red; }'], 'text/css');
|
||||
body.append('userfile', blob);
|
||||
const base = new BaseRequestOptions();
|
||||
|
@ -110,6 +110,13 @@ export function create(info: any /* ts.server.PluginCreateInfo */): ts.LanguageS
|
||||
return (fileName, p1, p2, p3) => tryCall(fileName, () => <T>(m.call(ls, fileName, p1, p2, p3)));
|
||||
}
|
||||
|
||||
function tryFilenameFourCall<T, P1, P2, P3, P4>(
|
||||
m: (fileName: string, p1: P1, p2: P2, p3: P3, p4: P4) =>
|
||||
T): (fileName: string, p1: P1, p2: P2, p3: P3, p4: P4) => T {
|
||||
return (fileName, p1, p2, p3, p4) =>
|
||||
tryCall(fileName, () => <T>(m.call(ls, fileName, p1, p2, p3, p4)));
|
||||
}
|
||||
|
||||
function typescriptOnly(ls: ts.LanguageService): ts.LanguageService {
|
||||
return {
|
||||
cleanupSemanticCache: () => ls.cleanupSemanticCache(),
|
||||
@ -152,7 +159,7 @@ export function create(info: any /* ts.server.PluginCreateInfo */): ts.LanguageS
|
||||
getFormattingEditsAfterKeystroke: tryFilenameThreeCall(ls.getFormattingEditsAfterKeystroke),
|
||||
getDocCommentTemplateAtPosition: tryFilenameOneCall(ls.getDocCommentTemplateAtPosition),
|
||||
isValidBraceCompletionAtPosition: tryFilenameTwoCall(ls.isValidBraceCompletionAtPosition),
|
||||
getCodeFixesAtPosition: tryFilenameThreeCall(ls.getCodeFixesAtPosition),
|
||||
getCodeFixesAtPosition: tryFilenameFourCall(ls.getCodeFixesAtPosition),
|
||||
getEmitOutput: tryFilenameCall(ls.getEmitOutput),
|
||||
getProgram: () => ls.getProgram(),
|
||||
dispose: () => ls.dispose()
|
||||
|
Reference in New Issue
Block a user