Skip to content

Commit

Permalink
chore: update tsconfig for example
Browse files Browse the repository at this point in the history
  • Loading branch information
cxtom committed May 21, 2021
1 parent 1c6df24 commit acdd3a5
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/app-autoload/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ interface AppAutoload {
name: string;
}

interface AppConfig {
export interface AppConfig {
dir: string;
prefix: string;
name: string;
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/templates/normal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@
"@commitlint/config-conventional": "^11.0.0",
"@ecomfe/eslint-config": "^7.0.0",
"@hoth/cli": "^1.0.2",
"@searchfe/tsconfig": "^1.1.0",
"@tsconfig/node12": "^1.0.7",
"@types/node": "^14.14.22",
"@types/nunjucks": "^3.1.4",
"@typescript-eslint/eslint-plugin": "^4.14.2",
"@typescript-eslint/parser": "^4.14.2",
"eslint": "^7.19.0",
Expand Down
5 changes: 3 additions & 2 deletions packages/cli/templates/normal/src/app.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import pointOfView from 'point-of-view';
import nunjucks from 'nunjucks';
import path from 'path';
import {FastifyInstance} from 'fastify';
export default async function main(fastify: FastifyInstance, config) {
import type {FastifyInstance} from 'fastify';
import type {AppConfig} from '@hoth/app-autoload';
export default async function main(fastify: FastifyInstance, config: AppConfig) {
await fastify.register(pointOfView, {
engine: {
nunjucks,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Controller, GET, Inject} from '@hoth/decorators';
import {FastifyReply, FastifyRequest} from 'fastify';
import type {FastifyReply, FastifyRequest} from 'fastify';
import Calculator from '../../lib/calc/index.service'

@Controller('/index')
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/templates/normal/src/plugin/foo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author
*/

import {FastifyInstance} from 'fastify';
import type {FastifyInstance} from 'fastify';

export default function (fastify: FastifyInstance, opts: any, next: any) {
console.log('foo plugin options', opts);
Expand Down
7 changes: 4 additions & 3 deletions packages/cli/templates/normal/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"extends": "@tsconfig/node12/tsconfig.json",
"extends": "@searchfe/tsconfig/base/recommend.json",
"compilerOptions": {
"target": "es2019",
"module": "commonjs",
"moduleResolution": "Node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"esModuleInterop": true,
"sourceMap": true,
"strict": false,
"outDir": "dist"
},
"include": ["src/**/*"]
Expand Down

0 comments on commit acdd3a5

Please sign in to comment.