moribvndvs / ng2-idle

Responding to idle users in Angular (not AngularJS) applications.
https://moribvndvs.github.io/ng2-idle
Apache License 2.0
315 stars 128 forks source link

Unable to use EventTargetInterruptOptions when creating custom EventTargetInterruptSource #70

Open ShaneYu opened 6 years ago

ShaneYu commented 6 years ago

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/HackedByChinese/ng2-idle/blob/master/CONTRIBUTING.md#getting-help

Current behavior Unable to import and use EventTargetInterruptOptions for custom created interrupt source that extends the EventTargetInterruptSource. Would appear the build and published library has removed that from the exported files.

Expected behavior Should be able to use EventTargetInterruptOptions when creating a custom interrupt source that extends the EventTargetInterruptSource.

Minimal reproduction of the problem with instructions Attempt to create a new interrupt source that extends the EventTargetInterruptSource class and use the EventTargetInterruptOptions.

Linting in IDE's highlights the issue as per the screenshot below, but also you cannot compile the project successfully.

VSCode Linting - Highlighting the issue

What is the motivation / use case for changing the behavior? The ability to create custom interrupt sources that extend the EventTargetInterruptSource and use the EventTargetInterruptOptions.

Please tell us about your environment: Windows 10, VSCode, NPM, Angular CLI

edlahoz commented 6 years ago

You need to install these versions since you are not on ng-6:

npm install --save @ng-idle/core@2.0.0-beta.15 @ng-idle/keepalive@2.0.0-beta.15

salmankazmi commented 5 years ago

Hi @ShaneYu ,

Were you able to create your custom events to handle?

SerzhanHelena commented 3 years ago

Hello! I have the same issue. My angular.json: { "name": "front", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@agm/core": "1.0.0", "@angular/animations": "8.2.6", "@angular/cdk": "8.2.1", "@angular/common": "8.2.5", "@angular/compiler": "8.2.5", "@angular/core": "8.2.5", "@angular/forms": "8.2.5", "@angular/material": "8.2.1", "@angular/material-moment-adapter": "8.2.3", "@angular/platform-browser": "8.2.5", "@angular/platform-browser-dynamic": "8.2.5", "@angular/router": "8.2.5", "@fortawesome/angular-fontawesome": "0.5.0", "@fortawesome/fontawesome-svg-core": "1.2.23", "@fortawesome/free-brands-svg-icons": "5.11.0", "@fortawesome/free-regular-svg-icons": "5.11.1", "@fortawesome/free-solid-svg-icons": "5.11.0", "@ng-idle/core": "10.0.0-beta.1", "@ng-idle/keepalive": "10.0.0-beta.1", "@ngx-formly/bootstrap": "^5.0.0", "@ngx-formly/core": "^5.0.0", "@ngx-formly/material": "^5.9.3", "@ngx-formly/schematics": "^5.9.3", "@ngx-translate/core": "12.1.2", "@ngx-translate/http-loader": "4.0.0", "angular2-ladda": "2.0.2", "angular2-moment": "^1.9.0", "angular2-text-mask": "9.0.0", "bootstrap": "4.3.1", "classlist.js": "1.1.20150312", "hammerjs": "2.0.8", "material-design-icons": "^3.0.1", "moment": "2.24.0", "ng-recaptcha": "5.0.0", "ngx-device-detector": "2.0.0", "ngx-plaid-link": "1.0.2", "rxjs": "6.4.0", "text-mask-addons": "3.8.0", "tslib": "1.10.0", "vanilla-text-mask": "5.1.1", "web-animations-js": "2.3.2", "zone.js": "0.9.1" }, "devDependencies": { "@angular-devkit/build-angular": "0.803.3", "@angular/cli": "8.3.3", "@angular/compiler-cli": "8.2.5", "@angular/language-service": "8.2.5", "@types/google.analytics": "0.0.40", "@types/jasmine": "3.3.16", "@types/jasminewd2": "2.0.6", "@types/node": "8.9.5", "codelyzer": "5.1.0", "jasmine-core": "3.4.0", "jasmine-spec-reporter": "4.2.1", "karma": "4.1.0", "karma-chrome-launcher": "2.2.0", "karma-coverage-istanbul-reporter": "2.0.6", "karma-jasmine": "2.0.1", "karma-jasmine-html-reporter": "1.4.2", "protractor": "5.4.2", "ts-node": "7.0.1", "tslint": "5.15.0", "typescript": "3.5.3" } }