Skip to content

Commit d8d15d0

Browse files
committed
Call super class methods with super
1 parent 354ae1a commit d8d15d0

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/transform-node.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class Transformer extends Source {
4848
properties: Partial<T> & { type: T['type'] } & RawNGSpan,
4949
ancestors: angular.AST[],
5050
) {
51-
const node = this.createNode(properties);
51+
const node = super.createNode(properties);
5252

5353
if (ancestors[0] instanceof angular.ParenthesizedExpression) {
5454
node.extra = {
@@ -142,9 +142,9 @@ class Transformer extends Source {
142142
childTransformOptions,
143143
);
144144
const leftEnd = node.exp.sourceSpan.end;
145-
const rightStart = this.getCharacterIndex(
145+
const rightStart = super.getCharacterIndex(
146146
/\S/,
147-
this.getCharacterIndex('|', leftEnd) + 1,
147+
super.getCharacterIndex('|', leftEnd) + 1,
148148
);
149149
const right = this.#create<babel.Identifier>(
150150
{
@@ -237,18 +237,19 @@ class Transformer extends Source {
237237
const { key, quoted } = property;
238238
const { start: valueStart, end: valueEnd } = values[index].sourceSpan;
239239

240-
const keyStart = this.getCharacterIndex(
240+
const keyStart = super.getCharacterIndex(
241241
/\S/,
242242
index === 0
243243
? node.sourceSpan.start + 1 // {
244-
: this.getCharacterIndex(',', values[index - 1].sourceSpan.end) + 1,
244+
: super.getCharacterIndex(',', values[index - 1].sourceSpan.end) +
245+
1,
245246
);
246247
const keyEnd =
247248
valueStart === keyStart
248249
? valueEnd
249-
: this.getCharacterLastIndex(
250+
: super.getCharacterLastIndex(
250251
/\S/,
251-
this.getCharacterLastIndex(':', valueStart - 1) - 1,
252+
super.getCharacterLastIndex(':', valueStart - 1) - 1,
252253
) + 1;
253254
const keySpan = { start: keyStart, end: keyEnd };
254255
const tKey = quoted

0 commit comments

Comments
 (0)