mirror of
https://github.com/Findus23/lw1.at.git
synced 2024-09-12 07:33:45 +02:00
unfinished typescript
This commit is contained in:
parent
d16da7f324
commit
4eec4dd5f4
8 changed files with 76 additions and 0 deletions
13
src/shims-tsx.d.ts
vendored
Normal file
13
src/shims-tsx.d.ts
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
import Vue, { VNode } from "vue";
|
||||
|
||||
declare global {
|
||||
namespace JSX {
|
||||
// tslint:disable no-empty-interface
|
||||
interface Element extends VNode {}
|
||||
// tslint:disable no-empty-interface
|
||||
interface ElementClass extends Vue {}
|
||||
interface IntrinsicElements {
|
||||
[elem: string]: any;
|
||||
}
|
||||
}
|
||||
}
|
4
src/shims-vue.d.ts
vendored
Normal file
4
src/shims-vue.d.ts
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
declare module "*.vue" {
|
||||
import Vue from "vue";
|
||||
export default Vue;
|
||||
}
|
20
src/types.ts
Normal file
20
src/types.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
export enum Language {
|
||||
de = "de",
|
||||
en = "en"
|
||||
}
|
||||
|
||||
|
||||
export interface DataEntry {
|
||||
id: string;
|
||||
title: string
|
||||
date: string
|
||||
description: string
|
||||
tags: string[]
|
||||
image: string
|
||||
github: string | null
|
||||
license: {
|
||||
id: string
|
||||
url: string
|
||||
}
|
||||
|
||||
}
|
13
tsconfig.json
Normal file
13
tsconfig.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
// this aligns with Vue's browser support
|
||||
"target": "es5",
|
||||
// this enables stricter inference for data properties on `this`
|
||||
"strict": true,
|
||||
// if using webpack 2+ or rollup, to leverage tree shaking:
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"baseUrl": "src/",
|
||||
"allowSyntheticDefaultImports": true
|
||||
}
|
||||
}
|
26
tslint.json
Normal file
26
tslint.json
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"defaultSeverity": "warning",
|
||||
"extends": [
|
||||
"tslint:recommended"
|
||||
],
|
||||
"linterOptions": {
|
||||
"exclude": [
|
||||
"node_modules/**"
|
||||
]
|
||||
},
|
||||
"rules": {
|
||||
"quotemark": [true, "double"],
|
||||
"indent": [true, "spaces", 4],
|
||||
"interface-name": false,
|
||||
"ordered-imports": false,
|
||||
"object-literal-sort-keys": false,
|
||||
"no-consecutive-blank-lines": false,
|
||||
"trailing-comma": [
|
||||
true,
|
||||
{
|
||||
"multiline": "never",
|
||||
"singleline": "never"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue