@@ -190,17 +190,17 @@ function nodesByPosition(first: ts.Node, second: ts.Node): number {
190
190
}
191
191
192
192
/**
193
- * Insert `toInsert` after the last occurence of `ts.SyntaxKind[nodes[i].kind]`
194
- * or after the last of occurence of `syntaxKind` if the last occurence is a sub child
193
+ * Insert `toInsert` after the last occurrence of `ts.SyntaxKind[nodes[i].kind]`
194
+ * or after the last of occurrence of `syntaxKind` if the last occurrence is a sub child
195
195
* of ts.SyntaxKind[nodes[i].kind] and save the changes in file.
196
196
*
197
- * @param nodes insert after the last occurence of nodes
197
+ * @param nodes insert after the last occurrence of nodes
198
198
* @param toInsert string to insert
199
199
* @param file file to insert changes into
200
- * @param fallbackPos position to insert if toInsert happens to be the first occurence
200
+ * @param fallbackPos position to insert if toInsert happens to be the first occurrence
201
201
* @param syntaxKind the ts.SyntaxKind of the subchildren to insert after
202
202
* @return Change instance
203
- * @throw Error if toInsert is first occurence but fall back is not set
203
+ * @throw Error if toInsert is first occurrence but fall back is not set
204
204
*/
205
205
export function insertAfterLastOccurrence (
206
206
nodes : ts . Node [ ] ,
@@ -220,7 +220,7 @@ export function insertAfterLastOccurrence(
220
220
. pop ( ) ;
221
221
}
222
222
if ( ! lastItem && fallbackPos == undefined ) {
223
- throw new Error ( `tried to insert ${ toInsert } as first occurence with no fallback position` ) ;
223
+ throw new Error ( `tried to insert ${ toInsert } as first occurrence with no fallback position` ) ;
224
224
}
225
225
const lastItemPosition : number = lastItem ? lastItem . getEnd ( ) : fallbackPos ;
226
226
0 commit comments