Skip to content

Undo changes needed to load codebase into ts-morph #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/compiler/factory/nodeFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import {
JsxAttributeValue, JsxChild, JsxClosingElement, JsxClosingFragment, JsxElement, JsxExpression, JsxFragment,
JsxOpeningElement, JsxOpeningFragment, JsxSelfClosingElement, JsxSpreadAttribute, JsxTagNameExpression, JsxText,
KeywordSyntaxKind, KeywordToken, KeywordTypeNode, KeywordTypeSyntaxKind, LabeledStatement, LanguageVariant,
lastOrUndefined, LeftHandSideExpression, LiteralToken, LiteralTypeNode, map, Map, MappedTypeNode, MemberName,
lastOrUndefined, LeftHandSideExpression, LiteralToken, LiteralTypeNode, map, Map, MappedTypeNode,
memoize, memoizeOne, MergeDeclarationMarker, MetaProperty, MethodDeclaration, MethodSignature, MinusToken,
MissingDeclaration, Modifier, ModifierFlags, ModifierLike, modifiersToFlags, ModifierSyntaxKind, ModifierToken,
ModuleBlock, ModuleBody, ModuleDeclaration, ModuleKind, ModuleName, ModuleReference, Mutable, MutableNodeArray,
Expand Down Expand Up @@ -249,11 +249,11 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
createObjectLiteralExpression,
updateObjectLiteralExpression,
createPropertyAccessExpression: flags & NodeFactoryFlags.NoIndentationOnFreshPropertyAccess ?
(expression: Expression, name: string | MemberName) => setEmitFlags(createPropertyAccessExpression(expression, name), EmitFlags.NoIndentation) :
(expression, name) => setEmitFlags(createPropertyAccessExpression(expression, name), EmitFlags.NoIndentation) :
createPropertyAccessExpression,
updatePropertyAccessExpression,
createPropertyAccessChain: flags & NodeFactoryFlags.NoIndentationOnFreshPropertyAccess ?
(expression: Expression, questionDotToken: QuestionDotToken | undefined, name: string | MemberName) => setEmitFlags(createPropertyAccessChain(expression, questionDotToken, name), EmitFlags.NoIndentation) :
(expression, questionDotToken, name: string) => setEmitFlags(createPropertyAccessChain(expression, questionDotToken, name), EmitFlags.NoIndentation) :
createPropertyAccessChain,
updatePropertyAccessChain,
createElementAccessExpression,
Expand Down Expand Up @@ -622,7 +622,7 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
liftToBlock,
mergeLexicalEnvironment,
updateModifiers,
} as any;
};

forEach(nodeFactoryPatchers, fn => fn(factory));

Expand Down
8 changes: 2 additions & 6 deletions src/tsserver/webServer.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/// <reference lib="webworker" />

import * as ts from "./_namespaces/ts";
import * as server from "./_namespaces/ts.server";
import {
Expand All @@ -8,12 +10,6 @@ import {
Debug, LanguageServiceMode, LogLevel, noop, returnFalse, returnUndefined, setSys, sys, validateLocaleAndSetLanguage,
} from "./_namespaces/ts";

declare const addEventListener: any;
declare const postMessage: any;
declare const close: any;
declare const location: any;
declare const XMLHttpRequest: any;
declare const self: any;

const nullLogger: Logger = {
close: noop,
Expand Down
7 changes: 4 additions & 3 deletions src/webServer/webServer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/// <reference lib="dom" />
/// <reference lib="webworker.importscripts" />

import * as server from "./_namespaces/ts.server";

import {
indent, Logger, LogLevel, ModuleImportResult, Msg, nowString, nullTypingsInstaller, protocol,
ServerCancellationToken, ServerHost, Session, SessionOptions,
Expand All @@ -8,9 +12,6 @@ import {
notImplemented, perfLogger, returnFalse, returnNoopFileWatcher, startsWith,
} from "./_namespaces/ts";

declare const fetch: any;
declare const importScripts: any;

/** @internal */
export interface HostWithWriteMessage {
writeMessage(s: any): void;
Expand Down