@@ -101,7 +101,7 @@ function detectImports(content: string, prefix: string): DetectImportResult {
101
101
return { imports, namespaces} ;
102
102
}
103
103
104
- /** Migrates the Material symbls in a file. */
104
+ /** Migrates the Material symbols in a file. */
105
105
function migrateMaterialSymbols ( content : string , importPath : string ,
106
106
detectedImports : DetectImportResult ) : string {
107
107
const initialContent = content ;
@@ -154,6 +154,7 @@ function migrateCdkSymbols(content: string, importPath: string,
154
154
* Renames all Sass symbols in a file based on a pre-defined mapping.
155
155
* @param content Content of a file to be migrated.
156
156
* @param mapping Mapping between symbol names and their replacements.
157
+ * @param namespaces Names to iterate over and pass to getKeyPattern.
157
158
* @param getKeyPattern Function used to turn each of the keys into a regex.
158
159
* @param formatValue Formats the value that will replace any matches of the pattern returned by
159
160
* `getKeyPattern`.
@@ -205,15 +206,15 @@ function insertUseStatement(content: string, importPath: string, importsToIgnore
205
206
/** Formats a migration key as a Sass mixin invocation. */
206
207
function mixinKeyFormatter ( namespace : string | null , name : string ) : RegExp {
207
208
// Note that adding a `(` at the end of the pattern would be more accurate, but mixin
208
- // invocations don't necessarily have to include the parantheses . We could add `[(;]`,
209
+ // invocations don't necessarily have to include the parentheses . We could add `[(;]`,
209
210
// but then we won't know which character to include in the replacement string.
210
211
return new RegExp ( `@include +${ escapeRegExp ( ( namespace ? namespace + '.' : '' ) + name ) } ` , 'g' ) ;
211
212
}
212
213
213
214
/** Returns a function that can be used to format a Sass mixin replacement. */
214
215
function getMixinValueFormatter ( namespace : string ) : ( name : string ) => string {
215
216
// Note that adding a `(` at the end of the pattern would be more accurate,
216
- // but mixin invocations don't necessarily have to include the parantheses .
217
+ // but mixin invocations don't necessarily have to include the parentheses .
217
218
return name => `@include ${ namespace } .${ name } ` ;
218
219
}
219
220
0 commit comments