From 13c39a52c681a251937d46958155d984bfd346d4 Mon Sep 17 00:00:00 2001 From: Chuck Jazdzewski Date: Wed, 25 May 2016 09:51:57 -0700 Subject: [PATCH] chore(compiler): Expose types needed by the language service The language service needs access to the parser error ranges and the static reflector. Closes #8838 --- modules/@angular/compiler/private_export.ts | 18 ++++++++++++++++++ modules/@angular/compiler_cli/index.ts | 1 + 2 files changed, 19 insertions(+) diff --git a/modules/@angular/compiler/private_export.ts b/modules/@angular/compiler/private_export.ts index 81ef39201c..adb5074c37 100644 --- a/modules/@angular/compiler/private_export.ts +++ b/modules/@angular/compiler/private_export.ts @@ -4,6 +4,7 @@ import * as metadata_resolver from './src/metadata_resolver'; import * as html_parser from './src/html_parser'; import * as directive_normalizer from './src/directive_normalizer'; import * as lexer from './src/expression_parser/lexer'; +import * as parse_util from './src/parse_util'; import * as parser from './src/expression_parser/parser'; import * as template_parser from './src/template_parser'; import * as dom_element_schema_registry from './src/schema/dom_element_schema_registry'; @@ -39,9 +40,26 @@ export namespace __compiler_private__ { export type Parser = parser.Parser; export var Parser = parser.Parser; + export type ParseLocation = parse_util.ParseLocation; + export var ParseLocation = parse_util.ParseLocation; + + export type ParseError = parse_util.ParseError; + export var ParseError = parse_util.ParseError; + + export type ParseErrorLevel = parse_util.ParseErrorLevel; + export var ParseErrorLevel = parse_util.ParseErrorLevel; + + export type ParseSourceFile = parse_util.ParseSourceFile; + export var ParseSourceFile = parse_util.ParseSourceFile; + + export type ParseSourceSpan = parse_util.ParseSourceSpan; + export var ParseSourceSpan = parse_util.ParseSourceSpan; + export type TemplateParser = template_parser.TemplateParser; export var TemplateParser = template_parser.TemplateParser; + export type TemplateParseResult = template_parser.TemplateParseResult; + export type DomElementSchemaRegistry = dom_element_schema_registry.DomElementSchemaRegistry; export var DomElementSchemaRegistry = dom_element_schema_registry.DomElementSchemaRegistry; diff --git a/modules/@angular/compiler_cli/index.ts b/modules/@angular/compiler_cli/index.ts index 1815b854b4..814aca2eb5 100644 --- a/modules/@angular/compiler_cli/index.ts +++ b/modules/@angular/compiler_cli/index.ts @@ -1,3 +1,4 @@ export {CodeGenerator} from './src/codegen'; export {NodeReflectorHost} from './src/reflector_host'; +export {StaticReflector, StaticReflectorHost, StaticSymbol} from './src/static_reflector'; export * from '@angular/tsc-wrapped';