@@ -142,55 +142,55 @@ namespace ts {
142142 type ResolutionKindSpecificLoader = ( candidate : string , extensions : string [ ] , failedLookupLocations : string [ ] , onlyRecordFalures : boolean , state : ModuleResolutionState ) => string ;
143143
144144 /**
145- * Any module resolution kind can be augmented with optional settings: 'baseUrl', 'paths' and 'rootDirs' - they are used to
146- * mitigate differences between design time structure of the project and its runtime counterpart so the same import name
147- * can be resolved successfully by TypeScript compiler and runtime module loader.
145+ * Any module resolution kind can be augmented with optional settings: 'baseUrl', 'paths' and 'rootDirs' - they are used to
146+ * mitigate differences between design time structure of the project and its runtime counterpart so the same import name
147+ * can be resolved successfully by TypeScript compiler and runtime module loader.
148148 * If these settings are set then loading procedure will try to use them to resolve module name and it can of failure it will
149149 * fallback to standard resolution routine.
150- *
150+ *
151151 * - baseUrl - this setting controls how non-relative module names are resolved. If this setting is specified then non-relative
152152 * names will be resolved relative to baseUrl: i.e. if baseUrl is '/a/b' then canditate location to resolve module name 'c/d' will
153153 * be '/a/b/c/d'
154- * - paths - this setting can only be used when baseUrl is specified. allows to tune how non-relative module names
155- * will be resolved based on the content of the module name.
154+ * - paths - this setting can only be used when baseUrl is specified. allows to tune how non-relative module names
155+ * will be resolved based on the content of the module name.
156156 * Structure of 'paths' compiler options
157157 * 'paths': {
158158 * pattern-1: [...substitutions],
159159 * pattern-2: [...substitutions],
160160 * ...
161161 * pattern-n: [...substitutions]
162162 * }
163- * Pattern here is a string that can contain zero or one '*' character. During module resolution module name will be matched against
163+ * Pattern here is a string that can contain zero or one '*' character. During module resolution module name will be matched against
164164 * all patterns in the list. Matching for patterns that don't contain '*' means that module name must be equal to pattern respecting the case.
165- * If pattern contains '*' then to match pattern "<prefix>*<suffix>" module name must start with the <prefix> and end with <suffix>.
166- * <MatchedStar> denotes part of the module name between <prefix> and <suffix>.
165+ * If pattern contains '*' then to match pattern "<prefix>*<suffix>" module name must start with the <prefix> and end with <suffix>.
166+ * <MatchedStar> denotes part of the module name between <prefix> and <suffix>.
167167 * If module name can be matches with multiple patterns then pattern with the longest prefix will be picked.
168- * After selecting pattern we'll use list of substitutions to get candidate locations of the module and the try to load module
169- * from the candidate location.
170- * Substitiution is a string that can contain zero or one '*'. To get candidate location from substitution we'll pick every
171- * substitution in the list and replace '*' with <MatchedStar> string. If candidate location is not rooted it
168+ * After selecting pattern we'll use list of substitutions to get candidate locations of the module and the try to load module
169+ * from the candidate location.
170+ * Substitiution is a string that can contain zero or one '*'. To get candidate location from substitution we'll pick every
171+ * substitution in the list and replace '*' with <MatchedStar> string. If candidate location is not rooted it
172172 * will be converted to absolute using baseUrl.
173173 * For example:
174174 * baseUrl: /a/b/c
175175 * "paths": {
176176 * // match all module names
177- * "*": [
177+ * "*": [
178178 * "*", // use matched name as is,
179179 * // <matched name> will be looked as /a/b/c/<matched name>
180180 *
181181 * "folder1/*" // substitution will convert matched name to 'folder1/<matched name>',
182- * // since it is not rooted then final candidate location will be /a/b/c/folder1/<matched name>
182+ * // since it is not rooted then final candidate location will be /a/b/c/folder1/<matched name>
183183 * ],
184184 * // match module names that start with 'components/'
185185 * "components/*": [ "/root/components/*" ] // substitution will convert /components/folder1/<matched name> to '/root/components/folder1/<matched name>',
186186 * // it is rooted so it will be final candidate location
187187 * }
188188 *
189- * 'rootDirs' allows the project to be spreaded across multiple locations and resolve modules with relative names as if
189+ * 'rootDirs' allows the project to be spreaded across multiple locations and resolve modules with relative names as if
190190 * they were in the same location. For example lets say there are two files
191191 * '/local/src/content/file1.ts'
192192 * '/shared/components/contracts/src/content/protocols/file2.ts'
193- * After bundling content of '/shared/components/contracts/src' will be merged with '/local/src' so
193+ * After bundling content of '/shared/components/contracts/src' will be merged with '/local/src' so
194194 * if file1 has the following import 'import {x} from "./protocols/file2"' it will be resolved successfully in runtime.
195195 * 'rootDirs' provides the way to tell compiler that in order to get the whole project it should behave as if content of all
196196 * root dirs were merged together.
@@ -229,7 +229,7 @@ namespace ts {
229229 let matchedNormalizedPrefix : string ;
230230 for ( const rootDir of state . compilerOptions . rootDirs ) {
231231 // rootDirs are expected to be absolute
232- // in case of tsconfig.json this will happen automatically - compiler will expand relative names
232+ // in case of tsconfig.json this will happen automatically - compiler will expand relative names
233233 // using locaton of tsconfig.json as base location
234234 let normalizedRoot = normalizePath ( rootDir ) ;
235235 if ( ! endsWith ( normalizedRoot , directorySeparator ) ) {
@@ -269,7 +269,7 @@ namespace ts {
269269 // then try to resolve using remaining entries in rootDirs
270270 for ( const rootDir of state . compilerOptions . rootDirs ) {
271271 if ( rootDir === matchedRootDir ) {
272- // skip the initially matched entry
272+ // skip the initially matched entry
273273 continue ;
274274 }
275275 const candidate = combinePaths ( normalizePath ( rootDir ) , suffix ) ;
@@ -412,7 +412,7 @@ namespace ts {
412412
413413 /**
414414 * @param {boolean } onlyRecordFailures - if true then function won't try to actually load files but instead record all attempts as failures. This flag is necessary
415- * in cases when we know upfront that all load attempts will fail (because containing folder does not exists) however we still need to record all failed lookup locations.
415+ * in cases when we know upfront that all load attempts will fail (because containing folder does not exists) however we still need to record all failed lookup locations.
416416 */
417417 function loadModuleFromFile ( candidate : string , extensions : string [ ] , failedLookupLocation : string [ ] , onlyRecordFailures : boolean , state : ModuleResolutionState ) : string {
418418 return forEach ( extensions , tryLoad ) ;
@@ -450,7 +450,7 @@ namespace ts {
450450 jsonContent = jsonText ? < { typings ?: string } > JSON . parse ( jsonText ) : { typings : undefined } ;
451451 }
452452 catch ( e ) {
453- // gracefully handle if readFile fails or returns not JSON
453+ // gracefully handle if readFile fails or returns not JSON
454454 jsonContent = { typings : undefined } ;
455455 }
456456
@@ -719,7 +719,7 @@ namespace ts {
719719
720720 const filesByName = createFileMap < SourceFile > ( ) ;
721721 // stores 'filename -> file association' ignoring case
722- // used to track cases when two file names differ only in casing
722+ // used to track cases when two file names differ only in casing
723723 const filesByNameIgnoreCase = host . useCaseSensitiveFileNames ( ) ? createFileMap < SourceFile > ( fileName => fileName . toLowerCase ( ) ) : undefined ;
724724
725725 if ( oldProgram ) {
@@ -1295,7 +1295,7 @@ namespace ts {
12951295 }
12961296
12971297 // TypeScript 1.0 spec (April 2014): 12.1.6
1298- // An ExternalImportDeclaration in an AmbientExternalModuleDeclaration may reference other external modules
1298+ // An ExternalImportDeclaration in an AmbientExternalModuleDeclaration may reference other external modules
12991299 // only through top - level external module names. Relative external module names are not permitted.
13001300 if ( ! inAmbientModule || ! isExternalModuleNameRelative ( ( < LiteralExpression > moduleNameExpr ) . text ) ) {
13011301 ( imports || ( imports = [ ] ) ) . push ( < LiteralExpression > moduleNameExpr ) ;
@@ -1313,7 +1313,7 @@ namespace ts {
13131313 ( moduleAugmentations || ( moduleAugmentations = [ ] ) ) . push ( moduleName ) ;
13141314 }
13151315 else if ( ! inAmbientModule ) {
1316- // An AmbientExternalModuleDeclaration declares an external module.
1316+ // An AmbientExternalModuleDeclaration declares an external module.
13171317 // This type of declaration is permitted only in the global module.
13181318 // The StringLiteral must specify a top - level external module name.
13191319 // Relative external module names are not permitted
@@ -1713,7 +1713,7 @@ namespace ts {
17131713 }
17141714
17151715 if ( options . reactNamespace && ! isIdentifier ( options . reactNamespace , languageVersion ) ) {
1716- programDiagnostics . add ( createCompilerDiagnostic ( Diagnostics . Invalide_value_for_reactNamespace_0_is_not_a_valid_identifier , options . reactNamespace ) ) ;
1716+ programDiagnostics . add ( createCompilerDiagnostic ( Diagnostics . Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier , options . reactNamespace ) ) ;
17171717 }
17181718
17191719 // If the emit is enabled make sure that every output file is unique and not overwriting any of the input files
0 commit comments