Skip to content

Top-level "this" will be replaced with undefined since this file is an ECMAScript module #157

@mpstadler

Description

@mpstadler

When using "ts-cacheable": "1.0.19" and running ng build --verbose I get the following DEBUG warning:

⚡ Done in 2807ms
● [DEBUG] Top-level "this" will be replaced with undefined since this file is an ECMAScript module [this-is-undefined-in-esm]

    node_modules/ts-cacheable/dist/esm2015/promise.cacheable.decorator.js:26:124:
      26 │             storageStrategy.remove ? storageStrategy.remove(cachePairs.indexOf(_foundCachePair), _foundCachePair, cacheKey, this) : storageStrategy.removeAtIndex(cachePairs.indexOf(_foundCachePair), cacheKey, this);
         │                                                                                                                             ~~~~
         ╵                                                                                                                             undefined

  This file is considered to be an ECMAScript module because of the "export" keyword here:

    node_modules/ts-cacheable/dist/esm2015/promise.cacheable.decorator.js:91:0:
      91 │ export function PCacheable(cacheConfig = {}) {
         ╵ ~~~~~~
⠇ Building...

Would be nice if this warning would be gone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions