Skip to content

An error occurred: RangeError: Maximum call stack size exceeded 2 classes refer each other #125

@goyaltushar92

Description

@goyaltushar92

Getting An error occurred: RangeError: Maximum call stack size exceeded error when trying to extract from a class.

export class GridSelectionModel<TKey> implements SelectionDetails<TKey> {
  constructor(
    private readonly dataSource: AvlMxGridDataSource<any, any, TKey, any, AvlMxGridColumn>
  ) {
  }

  // some properties and methods
}

AvlMxGridDataSource is an abstract class which has a constructor with TranslateService

export abstract class AvlMxGridDataSource<TItem, TKey> extends DataSource<TItem> {
  readonly selectionModel = new GridSelectionModel<TKey>(this);
  // other properties and methods
  
  constructor(protected translateService: TranslateService, /* some other arguments */) {
    super();
  }
}

@vendure/ngx-translate-extract version in use 9.4.2

Following command fails

npm run ngx-translate-extract -- -n -r --input .\projects\@avl-community\avl-mx-shared\src\lib\models\avl-mx-grid-selection-model.ts --output x.json -f json

while following succeeds

npm run ngx-translate-extract -- -n -r --input .\projects\@avl-community\avl-mx-shared\src\lib\utilities\avl-mx-grid-data-source.ts --output x.json -f json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions