Updated all NPM versioning and switched to lit-html.
This commit is contained in:
parent
6c9ac44eac
commit
0ba271be28
112
.eslintrc.json
112
.eslintrc.json
|
@ -1,58 +1,58 @@
|
||||||
{
|
{
|
||||||
"parser": "@typescript-eslint/parser",
|
"parser": "@typescript-eslint/parser",
|
||||||
"plugins": ["@typescript-eslint", "eslint-plugin-import", "prettier"],
|
"plugins": ["@typescript-eslint", "prettier", "jest", "unused-imports"],
|
||||||
"root": true,
|
"extends": ["@open-wc", "prettier"],
|
||||||
"env": {
|
"rules": {
|
||||||
"browser": true,
|
"@typescript-eslint/ban-ts-comment": "warn",
|
||||||
"es2021": true
|
"@typescript-eslint/ban-types": "warn",
|
||||||
},
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
"extends": ["plugin:@typescript-eslint/recommended", "prettier"],
|
"@typescript-eslint/no-shadow": ["warn"],
|
||||||
"parserOptions": {
|
"@typescript-eslint/no-unused-vars": "off",
|
||||||
"project": ["tsconfig.json"],
|
"@typescript-eslint/no-use-before-define": ["error", { "functions": false }],
|
||||||
"ecmaVersion": 2020,
|
"arrow-body-style": "warn",
|
||||||
"sourceType": "module"
|
"camelcase": "off",
|
||||||
},
|
"default-param-last": "off",
|
||||||
"rules": {
|
"dot-notation": "warn",
|
||||||
"no-await-in-loop": "off",
|
"eqeqeq": "warn",
|
||||||
"no-use-before-define": "off",
|
"import/extensions": "off",
|
||||||
"no-nested-ternary": "off",
|
"import/first": "warn",
|
||||||
"@typescript-eslint/no-use-before-define": ["error"],
|
"import/newline-after-import": "warn",
|
||||||
"@typescript-eslint/explicit-function-return-type": "off",
|
"import/no-cycle": "warn",
|
||||||
"@typescript-eslint/no-unused-vars": "off",
|
"import/no-extraneous-dependencies": "warn",
|
||||||
"import/extensions": "off",
|
"import/order": "warn",
|
||||||
"import/prefer-default-export": "off",
|
"import/prefer-default-export": "warn",
|
||||||
"@typescript-eslint/ban-types": "warn",
|
"no-else-return": "warn",
|
||||||
"@typescript-eslint/no-use-before-define": "warn",
|
"no-nested-ternary": "off",
|
||||||
"arrow-body-style": "warn",
|
"no-param-reassign": "warn",
|
||||||
"camelcase": "warn",
|
"no-return-assign": "warn",
|
||||||
"dot-notation": "warn",
|
"no-sequences": "warn",
|
||||||
"eqeqeq": "warn",
|
"no-shadow": "off",
|
||||||
"import/first": "warn",
|
"no-underscore-dangle": "off",
|
||||||
"import/newline-after-import": "warn",
|
"no-unneeded-ternary": "warn",
|
||||||
"import/no-extraneous-dependencies": "warn",
|
"no-unused-vars": "off",
|
||||||
"import/order": "warn",
|
"no-use-before-define": "off",
|
||||||
"no-else-return": "warn",
|
"object-shorthand": "warn",
|
||||||
"no-param-reassign": "warn",
|
"one-var": ["error", "never"],
|
||||||
"no-return-assign": "warn",
|
"one-var-declaration-per-line": ["error", "initializations"],
|
||||||
"no-sequences": "warn",
|
"prefer-arrow-callback": "warn",
|
||||||
"no-shadow": "off",
|
"prefer-const": "warn",
|
||||||
"@typescript-eslint/no-shadow": ["warn"],
|
"prefer-destructuring": "warn",
|
||||||
"no-underscore-dangle": "warn",
|
"prefer-template": "warn",
|
||||||
"no-unneeded-ternary": "warn",
|
"sort-imports": [
|
||||||
"object-shorthand": "warn",
|
"error",
|
||||||
"prefer-arrow-callback": "warn",
|
{
|
||||||
"prefer-const": "warn",
|
"ignoreDeclarationSort": true
|
||||||
"prefer-destructuring": "warn",
|
}
|
||||||
"prefer-template": "warn"
|
],
|
||||||
},
|
"unused-imports/no-unused-imports": "error",
|
||||||
"settings": {
|
"unused-imports/no-unused-vars": [
|
||||||
"import/resolver": {
|
"warn",
|
||||||
"node": {
|
{
|
||||||
"extensions": [".js", ".ts"]
|
"vars": "all",
|
||||||
},
|
"varsIgnorePattern": "^_",
|
||||||
"typescript": {
|
"args": "after-used",
|
||||||
"project": "./tsconfig.json"
|
"argsIgnorePattern": "^_"
|
||||||
}
|
}
|
||||||
}
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
14
.prettierrc
14
.prettierrc
|
@ -1,8 +1,10 @@
|
||||||
{
|
{
|
||||||
"trailingComma": "es5",
|
"useTabs": false,
|
||||||
"printWidth": 110,
|
"printWidth": 100,
|
||||||
"tabWidth": 4,
|
"tabWidth": 2,
|
||||||
"useTabs": false,
|
"semi": true,
|
||||||
"semi": true,
|
"singleQuote": false,
|
||||||
"singleQuote": false
|
"trailingComma": "all",
|
||||||
|
"bracketSameLine": false,
|
||||||
|
"arrowParens": "avoid"
|
||||||
}
|
}
|
||||||
|
|
12
index.html
12
index.html
|
@ -15,7 +15,8 @@
|
||||||
font-family: "Mulish", sans-serif;
|
font-family: "Mulish", sans-serif;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 1.36;
|
line-height: 1.36;
|
||||||
letter-spacing: 0.012em;
|
letter-spacing: 0.012em;
|
||||||
|
padding: 1rem;
|
||||||
}
|
}
|
||||||
p {
|
p {
|
||||||
color: #282828;
|
color: #282828;
|
||||||
|
@ -32,10 +33,11 @@
|
||||||
algorithm of the watch.
|
algorithm of the watch.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
25 years later, I found the source code buried somewhere in an old CD. I decided to try an
|
25 years later, I found the source code buried somewhere in an old
|
||||||
re-implement the logic in Javascript, and to experiment with a hand-written
|
CD. I decided to try an re-implement the logic in Javascript, and to
|
||||||
<a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components">Web Component</a>. This is
|
experiment with a
|
||||||
the result.
|
<a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components">Web Component</a>,
|
||||||
|
using the <a href="https://lit.dev">lit-html library</a>. This is the result.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
It might seem a bit silly to have implemented the seconds face when the minutes face has a
|
It might seem a bit silly to have implemented the seconds face when the minutes face has a
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
65
package.json
65
package.json
|
@ -1,33 +1,36 @@
|
||||||
{
|
{
|
||||||
"name": "DominoClock",
|
"name": "DominoClock",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "The Domino Clock",
|
"description": "The Domino Clock",
|
||||||
"main": "build/index.js",
|
"main": "build/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build --base='./'",
|
"build": "vite build --base='./'",
|
||||||
"lint": "eslint",
|
"lint": "eslint",
|
||||||
"dev": "vite -m development",
|
"dev": "vite -m development",
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"author": "Elf M. Sternberg <elf.sternberg@gmail.com>",
|
"author": "Elf M. Sternberg <elf.sternberg@gmail.com>",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"devDependencies": {
|
"dependencies": {
|
||||||
"@types/jest": "^27.0.2",
|
"lit": "^2.0.2"
|
||||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
},
|
||||||
"@typescript-eslint/parser": "^5.4.0",
|
"devDependencies": {
|
||||||
"eslint": "^8.2.0",
|
"@open-wc/eslint-config": "^9.2.1",
|
||||||
"eslint-config-airbnb": "^19.0.0",
|
"@types/jest": "^27.0.2",
|
||||||
"eslint-config-prettier": "^8.3.0",
|
"@typescript-eslint/eslint-plugin": "^5.48.0",
|
||||||
"eslint-import-resolver-typescript": "^2.5.0",
|
"@typescript-eslint/parser": "^5.48.0",
|
||||||
"eslint-plugin-import": "^2.25.3",
|
"eslint": "^8.3.0",
|
||||||
"eslint-plugin-prettier": "^4.0.0",
|
"eslint-config-prettier": "^8.3.0",
|
||||||
"jest": "^27.3.1",
|
"eslint-plugin-import": "^2.25.3",
|
||||||
"prettier": "^2.4.1",
|
"eslint-plugin-jest": "^27.2.1",
|
||||||
"rimraf": "^3.0.2",
|
"eslint-plugin-prettier": "^4.0.0",
|
||||||
"typescript": "^4.4.4",
|
"eslint-plugin-unused-imports": "^2.0.0",
|
||||||
"vite": "^2.6.14",
|
"jest": "^27.3.1",
|
||||||
"vite-plugin-compression": "^0.3.5",
|
"prettier": "^2.4.1",
|
||||||
"vite-plugin-ejs": "^1.4.3",
|
"typescript": "^4.5.2",
|
||||||
"vite-plugin-eslint": "^1.3.0"
|
"vite": "^2.6.14",
|
||||||
}
|
"vite-plugin-compression": "^0.3.5",
|
||||||
|
"vite-plugin-ejs": "^1.4.3",
|
||||||
|
"vite-plugin-eslint": "^1.3.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,77 @@
|
||||||
|
import { LitElement, css, html } from "lit";
|
||||||
|
import { customElement, state } from "lit/decorators.js";
|
||||||
|
import "./DominoFace.ts";
|
||||||
|
|
||||||
|
type Times = number[];
|
||||||
|
type Cats = Times;
|
||||||
|
const MATRIX: Cats[] = [
|
||||||
|
[1, 5, 8, 9, 11],
|
||||||
|
[2, 5, 6, 10, 11],
|
||||||
|
[3, 6, 7, 9, 11],
|
||||||
|
[4, 7, 8, 10, 11],
|
||||||
|
];
|
||||||
|
|
||||||
|
const tock = (time: number) => [0, 1, 2, 3].map(i => MATRIX[i].includes(time));
|
||||||
|
|
||||||
|
@customElement("domino-clock")
|
||||||
|
export class DominoClock extends LitElement {
|
||||||
|
timer: number;
|
||||||
|
|
||||||
|
@state() hour = [false, false, false, false];
|
||||||
|
|
||||||
|
@state() minute = [false, false, false, false];
|
||||||
|
|
||||||
|
@state() second = [false, false, false, false];
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
this.timer = 0;
|
||||||
|
this.paint = this.paint.bind(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
paint() {
|
||||||
|
const now = new Date();
|
||||||
|
const rawHours = now.getHours();
|
||||||
|
this.hour = tock(rawHours > 12 ? rawHours - 12 : rawHours);
|
||||||
|
this.minute = tock(Math.floor(now.getUTCMinutes() / 5));
|
||||||
|
this.second = tock(Math.floor(now.getUTCSeconds() / 5));
|
||||||
|
this.timer = window.setTimeout(this.paint, 250);
|
||||||
|
}
|
||||||
|
|
||||||
|
connectedCallback() {
|
||||||
|
if (super.connectedCallback) {
|
||||||
|
super.connectedCallback();
|
||||||
|
}
|
||||||
|
this.timer = window.setTimeout(this.paint, 250);
|
||||||
|
}
|
||||||
|
|
||||||
|
disconnectedCallback() {
|
||||||
|
window.clearTimeout(this.timer);
|
||||||
|
if (super.disconnectedCallback) {
|
||||||
|
super.disconnectedCallback();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static styles = css`
|
||||||
|
:host {
|
||||||
|
--dominoclock-default-direction: row;
|
||||||
|
--dominoclock-default-face-gap: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dominoclock {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: var(--dominoclock-direction, var(--dominoclock-default-direction, row));
|
||||||
|
gap: var(--dominoclock-face-gap, var(--dominoclock-default-face-gap, 0.25rem));
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return html` <div class="dominoclock">
|
||||||
|
<domino-face .time=${this.hour}></domino-face>
|
||||||
|
<domino-face .time=${this.minute}></domino-face>
|
||||||
|
<domino-face .time=${this.second}></domino-face>
|
||||||
|
</div>`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default DominoClock;
|
|
@ -0,0 +1,71 @@
|
||||||
|
import { LitElement, css, html } from "lit";
|
||||||
|
import { customElement, property } from "lit/decorators.js";
|
||||||
|
|
||||||
|
type Dots = [boolean, boolean, boolean, boolean];
|
||||||
|
|
||||||
|
function timeChanged(oldvalue: Dots, newvalue: Dots): boolean {
|
||||||
|
if (!newvalue) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return !oldvalue.reduce((acc, t, idx) => acc && t === newvalue[idx], true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@customElement("domino-face")
|
||||||
|
export class DominoClockface extends LitElement {
|
||||||
|
@property({ type: Array, hasChanged: timeChanged }) time = [false, false, false, false];
|
||||||
|
|
||||||
|
static styles = css`
|
||||||
|
:host {
|
||||||
|
--dominoclock-default-dot-size: 1rem;
|
||||||
|
--dominoclock-default-dot-color: #2f4f4f;
|
||||||
|
--dominoclock-default-face-size: 5rem;
|
||||||
|
--dominoclock-default-background-color: #daaf20;
|
||||||
|
--dominoclock-default-border-radius: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.face {
|
||||||
|
position: relative;
|
||||||
|
width: var(--dominoclock-face-size, var(--dominoclock-default-face-size, 5rem));
|
||||||
|
height: var(--dominoclock-face-size, var(--dominoclock-default-face-size, 5rem));
|
||||||
|
background-color: var(
|
||||||
|
--dominoclock-background-color,
|
||||||
|
var(--dominoclock-default-background-color, #daaf20)
|
||||||
|
);
|
||||||
|
border: 1px solid #282828;
|
||||||
|
border-radius: var(--dominoclock-border-radius, var(--dominoclock-default-border-radius, 0.5rem));
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
grid-template-rows: 1fr 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dot {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: grid;
|
||||||
|
place-items: center center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dot > div {
|
||||||
|
transition: opacity 0.3s ease;
|
||||||
|
width: var(--dominoclock-date-size, var(--dominoclock-default-date-size, 1rem));
|
||||||
|
height: var(--dominoclock-date-size, var(--dominoclock-default-date-size, 1rem));
|
||||||
|
background-color: var(--dominoclock-dot-color, var(--dominoclock-default-dot-color, #2f4f4f));
|
||||||
|
border-radius: calc(var(--dominoclock-dot-size, var(--dominoclock-default-dot-size, 1rem)) / 2);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dot.active > div {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return html`<div class="face">
|
||||||
|
${this.time.map(pos =>
|
||||||
|
pos ? html`<div class="dot active"><div></div></div>` : html`<div class="dot"><div></div></div>`
|
||||||
|
)}
|
||||||
|
</div>`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default DominoClockface;
|
144
src/index.ts
144
src/index.ts
|
@ -1,142 +1,4 @@
|
||||||
type Times = number[];
|
import { DominoClock } from "./DominoClock.ts";
|
||||||
type Cats = [string, Times];
|
|
||||||
const MATRIX: Cats[] = [
|
|
||||||
["o0", [1, 5, 8, 9, 11]],
|
|
||||||
["o1", [2, 5, 6, 10, 11]],
|
|
||||||
["o2", [3, 6, 7, 9, 11]],
|
|
||||||
["o3", [4, 7, 8, 10, 11]],
|
|
||||||
];
|
|
||||||
|
|
||||||
const TEMPLATE = `
|
export { DominoClock };
|
||||||
<style>
|
export default DominoClock;
|
||||||
.dominoclock {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: var(--dominoclock-direction, row);
|
|
||||||
}
|
|
||||||
.face {
|
|
||||||
position: relative;
|
|
||||||
width: var(--dominoclock-size, 5rem);
|
|
||||||
height: var(--dominoclock-size, 5rem);
|
|
||||||
background-color: var(--dominoclock-background, #daaf20);
|
|
||||||
border: 1px solid #282828;
|
|
||||||
border-radius: var(--domino-clock-borderradius, 0.5rem);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.face:not(:last-child) {
|
|
||||||
margin-right: 0.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dot {
|
|
||||||
position: absolute;
|
|
||||||
width: var(--dominoclock-dot-size, 1rem);
|
|
||||||
height: var(--dominoclock-dot-size, 1rem);
|
|
||||||
background-color: var(--dominoclock-dot-color, #2f4f4f);
|
|
||||||
transition: opacity 0.3s ease;
|
|
||||||
border-radius: calc(var(--dominoclock-dot-size, 1rem) / 2);
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
.o0 {
|
|
||||||
top: var(--dominoclock-dot-size, 1rem);
|
|
||||||
left: var(--dominoclock-dot-size, 1rem);
|
|
||||||
}
|
|
||||||
.o1 {
|
|
||||||
top: var(--dominoclock-dot-size, 1rem);
|
|
||||||
left: calc(3 * var(--dominoclock-dot-size, 1rem));
|
|
||||||
}
|
|
||||||
.o2 {
|
|
||||||
top: calc(3 * var(--dominoclock-dot-size, 1rem));
|
|
||||||
left: calc(3 * var(--dominoclock-dot-size, 1rem));
|
|
||||||
}
|
|
||||||
.o3 {
|
|
||||||
top: calc(3 * var(--dominoclock-dot-size, 1rem));
|
|
||||||
left: var(--dominoclock-dot-size, 1rem);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<div class="dominoclock">
|
|
||||||
<div class="face" id="hours">
|
|
||||||
<div class="dot o0" ></div>
|
|
||||||
<div class="dot o1" ></div>
|
|
||||||
<div class="dot o2" ></div>
|
|
||||||
<div class="dot o3" ></div>
|
|
||||||
</div>
|
|
||||||
<div class="face" id="minutes">
|
|
||||||
<div class="dot o0" ></div>
|
|
||||||
<div class="dot o1" ></div>
|
|
||||||
<div class="dot o2" ></div>
|
|
||||||
<div class="dot o3" ></div>
|
|
||||||
</div>
|
|
||||||
<div class="face" id="seconds">
|
|
||||||
<div class="dot o0" ></div>
|
|
||||||
<div class="dot o1" ></div>
|
|
||||||
<div class="dot o2" ></div>
|
|
||||||
<div class="dot o3" ></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
|
|
||||||
type Face = "hours" | "minutes" | "seconds";
|
|
||||||
|
|
||||||
const isFace = (v: unknown): v is Face => {
|
|
||||||
if (typeof v === "string" && ["hours", "minutes", "seconds"].includes(v)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
throw new Error(`Expected a Face, got ${v}`);
|
|
||||||
};
|
|
||||||
|
|
||||||
class DominoClock extends HTMLElement {
|
|
||||||
elements: { [K in Face]: HTMLDivElement };
|
|
||||||
|
|
||||||
timer: number;
|
|
||||||
|
|
||||||
constructor() {
|
|
||||||
super();
|
|
||||||
this.timer = 0;
|
|
||||||
this.innerHTML = TEMPLATE;
|
|
||||||
this.elements = Object.fromEntries(
|
|
||||||
Array.from(this.getElementsByTagName("div"))
|
|
||||||
.filter(element => element.className === "face")
|
|
||||||
.map(element => [isFace(element.id) && element.id, element])
|
|
||||||
);
|
|
||||||
this.paint = this.paint.bind(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
connectedCallback() {
|
|
||||||
this.timer = window.setTimeout(this.paint, 250);
|
|
||||||
}
|
|
||||||
|
|
||||||
disconnectedCallback() {
|
|
||||||
window.clearTimeout(this.timer);
|
|
||||||
}
|
|
||||||
|
|
||||||
tock(board: Face, time: number) {
|
|
||||||
const dots = Array.from(this.elements[board].getElementsByTagName("div"));
|
|
||||||
dots.forEach(element => {
|
|
||||||
element.style.opacity = "0";
|
|
||||||
});
|
|
||||||
dots.forEach(element => {
|
|
||||||
const row = MATRIX.find(i => Array.from(element.classList).includes(i[0]));
|
|
||||||
if (!row) {
|
|
||||||
console.log(`Didn't find a row for ${element.className}?`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (row[1].includes(time)) {
|
|
||||||
element.style.opacity = "1";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
paint() {
|
|
||||||
const now = new Date();
|
|
||||||
const rawHours = now.getHours();
|
|
||||||
const hours = rawHours > 12 ? rawHours - 12 : rawHours;
|
|
||||||
this.tock("hours", hours);
|
|
||||||
this.tock("minutes", Math.floor(now.getUTCMinutes() / 5));
|
|
||||||
this.tock("seconds", Math.floor(now.getUTCSeconds() / 5));
|
|
||||||
window.clearTimeout(this.timer);
|
|
||||||
this.timer = window.setTimeout(this.paint, 250);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
customElements.define("domino-clock", DominoClock);
|
|
||||||
|
|
|
@ -1,30 +1,32 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"sourceMap": false,
|
"target": "es2018",
|
||||||
"noImplicitAny": false,
|
"module": "esnext",
|
||||||
"module": "esnext",
|
"moduleResolution": "node",
|
||||||
"target": "es2019",
|
"noEmitOnError": true,
|
||||||
"lib": ["es2019", "dom", "dom.iterable"],
|
"lib": ["es2017", "dom"],
|
||||||
"removeComments": true,
|
"strict": true,
|
||||||
"allowSyntheticDefaultImports": true,
|
"esModuleInterop": false,
|
||||||
"declaration": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"allowJs": true,
|
"experimentalDecorators": true,
|
||||||
"strict": true,
|
"emitDecoratorMetadata": false,
|
||||||
"baseUrl": "./",
|
"importHelpers": true,
|
||||||
"esModuleInterop": true,
|
"outDir": "dist",
|
||||||
"resolveJsonModule": true,
|
"sourceMap": true,
|
||||||
"moduleResolution": "node",
|
"inlineSources": true,
|
||||||
"downlevelIteration": true,
|
"baseUrl": "./",
|
||||||
"noUnusedLocals": true /* Report errors on unused locals. */,
|
"rootDir": "./",
|
||||||
"experimentalDecorators": true,
|
"declaration": true,
|
||||||
"noUnusedParameters": true /* Report errors on unused parameters. */,
|
"incremental": true,
|
||||||
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */,
|
"noUnusedLocals": true,
|
||||||
"noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */,
|
"noUnusedParameters": true,
|
||||||
"noUncheckedIndexedAccess": true /* Include 'undefined' in index signature results */,
|
"noImplicitReturns": true,
|
||||||
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */,
|
"noFallthroughCasesInSwitch": true,
|
||||||
"paths": {
|
"noUncheckedIndexedAccess": true,
|
||||||
"@/*": ["./src/*"]
|
"forceConsistentCasingInFileNames": true,
|
||||||
}
|
"paths": {
|
||||||
},
|
"@/*": ["./src/*"]
|
||||||
"include": ["./src/**/*"]
|
}
|
||||||
|
},
|
||||||
|
"include": ["./src/**/*"]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue