Aurelia 1.x Q&A - Sandbox at https://codesandbox.io/s/aurelia-javascript-sandbox-jnl6q85zq5
dependabot[bot] on npm_and_yarn
chore(deps): bump terser from 4… (compare)
dependabot[bot] on npm_and_yarn
chore(deps): bump terser from 4… (compare)
dependabot[bot] on npm_and_yarn
chore(deps): bump terser from 4… (compare)
dependabot[bot] on npm_and_yarn
chore(deps): bump terser from 5… (compare)
Error: src\main.ts(4,23): error TS2307: Cannot find module 'i18next-resource-store-loader!./assets/i18n/index.js'.
i'm following steps from the aurelia documentation: https://aurelia.io/docs/plugins/i18n#bundle-translation-files
switchMap
in store.pipe
for the Aurelia Store App? I'm getting a funky ts violation:Argument of type 'OperatorFunction<QuickstartState, IQuickstartWorkspaceState>' is not assignable to parameter of type
'string | Reducer<QuickstartState, [OperatorFunction<QuickStartWorkspaceState, QuickStartWorkspaceState>, OperatorFunction<...>]>'.
{
"compileOnSave": false,
"compilerOptions": {
"target": "es2017",
"module": "esnext",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"sourceMap": true,
"allowJs": true,
"baseUrl": "src",
"skipLibCheck": true,
"lib": [
"es2017", "dom", "es2018.promise"
],
"noUnusedLocals": true,
"paths": {
"*" : ["*", "typings/*"],
},
},
"include": [
"src/**/*"
],
"exclude": [
"./bundles/**/*",
"./node_modules/**/*",
"dist",
"build",
"doc",
"test",
"config.js",
"gulpfile.js",
"karma.conf.js",
"bundles",
"lib"
]
}
mouseUpEventListener: EventListener = (e: MouseEvent) => { this.mouseCanvas_mouseUp(e); }
this.mouseCanvas.addEventListener('mouseup', this.mouseUpEventListener);
private mouseCanvas_mouseUp(e: MouseEvent) {
if (e.preventDefault) e.preventDefault();
if (e.stopPropagation) e.stopPropagation();
let lePointerEvent = <PointerEvent>{ offsetX: e.offsetX, offsetY: e.offsetY };
this.mouseCanvas_pointerUp(lePointerEvent);
}
Thanks @TonyLugg I was looking for a way to listen to manually dispatched events that aren’t necessarily bound to an element. So if the code has something like
window.dispatchEvent(new CustomEvent(‘dateChanged’,newDate));
I guess, based on your example, I can do
this.addEventListener(‘dateChanged’, this.dateChangedListener);