From c6032c6d36a943fd31e862ccb623dde1ac5c0171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Fri, 1 Feb 2019 00:00:54 +0900 Subject: [PATCH] Create type definition for '*/meta.json' (#4073) --- src/@types/meta.json.d.ts | 3 +++ src/server/api/endpoints/meta.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 src/@types/meta.json.d.ts diff --git a/src/@types/meta.json.d.ts b/src/@types/meta.json.d.ts new file mode 100644 index 000000000..ab812682b --- /dev/null +++ b/src/@types/meta.json.d.ts @@ -0,0 +1,3 @@ +declare module '*/meta.json' { + const version: string; +} diff --git a/src/server/api/endpoints/meta.ts b/src/server/api/endpoints/meta.ts index 6aed1b229..91cb095c9 100644 --- a/src/server/api/endpoints/meta.ts +++ b/src/server/api/endpoints/meta.ts @@ -6,7 +6,7 @@ import define from '../define'; import fetchMeta from '../../../misc/fetch-meta'; import * as pkg from '../../../../package.json'; -const client = require('../../../../built/client/meta.json'); +import * as client from '../../../../built/client/meta.json'; export const meta = { stability: 'stable',