This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { build, files, version } from '$service-worker'; | |
// https://github.com/microsoft/TypeScript/issues/11781 - this is needed for TS and ESLint | |
/// env serviceworker | |
const globalThis = /** @type {unknown} */ (self); | |
/// <reference no-default-lib="true"/> | |
/// <reference lib="es2020" /> | |
/// <reference lib="WebWorker" /> | |
const sw = /** @type {ServiceWorkerGlobalScope & typeof globalThis} */ (globalThis); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) install dependencies: | |
yarn add @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-airbnb-typescript eslint-config-prettier eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks prettier --dev | |
2) create .eslintrc.js file: | |
``` | |
module.exports = { | |
parser: "@typescript-eslint/parser", // Specifies the ESLint parser | |
extends: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Builder, By, Key, until } = require('selenium-webdriver'); | |
const firefox = require('selenium-webdriver/firefox'); | |
const Command = require('selenium-webdriver/lib/command').Command; | |
const path = require('path'); | |
const options = new firefox.Options() | |
.setPreference('extensions.firebug.showChromeErrors', true); | |
(async function example() { | |
let driver = await new Builder() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Observable } from 'rxjs' | |
export function log() { | |
return function logFn<T>(source: Observable<T>) { | |
const output = new Observable<T>((observer) => { | |
const subscription = source.subscribe({ | |
next: (val) => { | |
console.log(val) | |
observer.next(val) | |
}, |