Create new type definition for 'ms' (#4057)
* Create new type definition for 'ms' * Follow lint
This commit is contained in:
parent
9c106022ae
commit
da1a238be3
@ -63,7 +63,6 @@
|
|||||||
"@types/mkdirp": "0.5.2",
|
"@types/mkdirp": "0.5.2",
|
||||||
"@types/mocha": "5.2.5",
|
"@types/mocha": "5.2.5",
|
||||||
"@types/mongodb": "3.1.19",
|
"@types/mongodb": "3.1.19",
|
||||||
"@types/ms": "0.7.30",
|
|
||||||
"@types/node": "10.12.18",
|
"@types/node": "10.12.18",
|
||||||
"@types/nodemailer": "4.6.5",
|
"@types/nodemailer": "4.6.5",
|
||||||
"@types/nprogress": "0.0.29",
|
"@types/nprogress": "0.0.29",
|
||||||
|
12
src/@types/ms.d.ts
vendored
Normal file
12
src/@types/ms.d.ts
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
declare module 'ms' {
|
||||||
|
interface IMSOptions {
|
||||||
|
long: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
function ms(value: string): number;
|
||||||
|
function ms(value: number, options?: IMSOptions): string;
|
||||||
|
|
||||||
|
namespace ms {} // Hack
|
||||||
|
|
||||||
|
export = ms;
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
import $ from 'cafy'; import ID, { transform } from '../../../../misc/cafy-id';
|
import $ from 'cafy'; import ID, { transform } from '../../../../misc/cafy-id';
|
||||||
const ms = require('ms');
|
import * as ms from 'ms';
|
||||||
import User, { pack } from '../../../../models/user';
|
import User, { pack } from '../../../../models/user';
|
||||||
import Blocking from '../../../../models/blocking';
|
import Blocking from '../../../../models/blocking';
|
||||||
import create from '../../../../services/blocking/create';
|
import create from '../../../../services/blocking/create';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import $ from 'cafy'; import ID, { transform } from '../../../../misc/cafy-id';
|
import $ from 'cafy'; import ID, { transform } from '../../../../misc/cafy-id';
|
||||||
const ms = require('ms');
|
import * as ms from 'ms';
|
||||||
import User, { pack } from '../../../../models/user';
|
import User, { pack } from '../../../../models/user';
|
||||||
import Blocking from '../../../../models/blocking';
|
import Blocking from '../../../../models/blocking';
|
||||||
import deleteBlocking from '../../../../services/blocking/delete';
|
import deleteBlocking from '../../../../services/blocking/delete';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const ms = require('ms');
|
import * as ms from 'ms';
|
||||||
import $ from 'cafy'; import ID, { transform } from '../../../../../misc/cafy-id';
|
import $ from 'cafy'; import ID, { transform } from '../../../../../misc/cafy-id';
|
||||||
import { validateFileName, pack } from '../../../../../models/drive-file';
|
import { validateFileName, pack } from '../../../../../models/drive-file';
|
||||||
import create from '../../../../../services/drive/add-file';
|
import create from '../../../../../services/drive/add-file';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import $ from 'cafy'; import ID, { transform } from '../../../../../misc/cafy-id';
|
import $ from 'cafy'; import ID, { transform } from '../../../../../misc/cafy-id';
|
||||||
const ms = require('ms');
|
import * as ms from 'ms';
|
||||||
import { pack } from '../../../../../models/drive-file';
|
import { pack } from '../../../../../models/drive-file';
|
||||||
import uploadFromUrl from '../../../../../services/drive/upload-from-url';
|
import uploadFromUrl from '../../../../../services/drive/upload-from-url';
|
||||||
import define from '../../../define';
|
import define from '../../../define';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import $ from 'cafy'; import ID, { transform } from '../../../../misc/cafy-id';
|
import $ from 'cafy'; import ID, { transform } from '../../../../misc/cafy-id';
|
||||||
const ms = require('ms');
|
import * as ms from 'ms';
|
||||||
import User, { pack } from '../../../../models/user';
|
import User, { pack } from '../../../../models/user';
|
||||||
import Following from '../../../../models/following';
|
import Following from '../../../../models/following';
|
||||||
import create from '../../../../services/following/create';
|
import create from '../../../../services/following/create';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import $ from 'cafy'; import ID, { transform } from '../../../../misc/cafy-id';
|
import $ from 'cafy'; import ID, { transform } from '../../../../misc/cafy-id';
|
||||||
const ms = require('ms');
|
import * as ms from 'ms';
|
||||||
import User, { pack } from '../../../../models/user';
|
import User, { pack } from '../../../../models/user';
|
||||||
import Following from '../../../../models/following';
|
import Following from '../../../../models/following';
|
||||||
import deleteFollowing from '../../../../services/following/delete';
|
import deleteFollowing from '../../../../services/following/delete';
|
||||||
|
@ -6,7 +6,7 @@ import * as nodemailer from 'nodemailer';
|
|||||||
import fetchMeta from '../../../../misc/fetch-meta';
|
import fetchMeta from '../../../../misc/fetch-meta';
|
||||||
import rndstr from 'rndstr';
|
import rndstr from 'rndstr';
|
||||||
import config from '../../../../config';
|
import config from '../../../../config';
|
||||||
const ms = require('ms');
|
import * as ms from 'ms';
|
||||||
import * as bcrypt from 'bcryptjs';
|
import * as bcrypt from 'bcryptjs';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
|
@ -3,7 +3,7 @@ import ID, { transform } from '../../../../../misc/cafy-id';
|
|||||||
import Message from '../../../../../models/messaging-message';
|
import Message from '../../../../../models/messaging-message';
|
||||||
import define from '../../../define';
|
import define from '../../../define';
|
||||||
import { publishMessagingStream } from '../../../../../stream';
|
import { publishMessagingStream } from '../../../../../stream';
|
||||||
const ms = require('ms');
|
import * as ms from 'ms';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
stability: 'stable',
|
stability: 'stable',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import $ from 'cafy'; import ID, { transform, transformMany } from '../../../../misc/cafy-id';
|
import $ from 'cafy'; import ID, { transform, transformMany } from '../../../../misc/cafy-id';
|
||||||
const ms = require('ms');
|
import * as ms from 'ms';
|
||||||
import { length } from 'stringz';
|
import { length } from 'stringz';
|
||||||
import Note, { INote, isValidCw, pack } from '../../../../models/note';
|
import Note, { INote, isValidCw, pack } from '../../../../models/note';
|
||||||
import User, { IUser } from '../../../../models/user';
|
import User, { IUser } from '../../../../models/user';
|
||||||
|
@ -3,7 +3,7 @@ import Note from '../../../../models/note';
|
|||||||
import deleteNote from '../../../../services/note/delete';
|
import deleteNote from '../../../../services/note/delete';
|
||||||
import User from '../../../../models/user';
|
import User from '../../../../models/user';
|
||||||
import define from '../../define';
|
import define from '../../define';
|
||||||
const ms = require('ms');
|
import * as ms from 'ms';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
stability: 'stable',
|
stability: 'stable',
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import * as mongo from 'mongodb';
|
import * as mongo from 'mongodb';
|
||||||
import $ from 'cafy'; import ID, { transform } from '../../../../../misc/cafy-id';
|
import $ from 'cafy'; import ID, { transform } from '../../../../../misc/cafy-id';
|
||||||
import define from '../../../define';
|
import define from '../../../define';
|
||||||
const ms = require('ms');
|
import * as ms from 'ms';
|
||||||
import deleteReaction from '../../../../../services/note/reaction/delete';
|
import deleteReaction from '../../../../../services/note/reaction/delete';
|
||||||
import { IUser } from '../../../../../models/user';
|
import { IUser } from '../../../../../models/user';
|
||||||
import { getValiedNote } from '../../../common/getters';
|
import { getValiedNote } from '../../../common/getters';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const ms = require('ms');
|
import * as ms from 'ms';
|
||||||
import $ from 'cafy';
|
import $ from 'cafy';
|
||||||
import User, { pack, ILocalUser } from '../../../../models/user';
|
import User, { pack, ILocalUser } from '../../../../models/user';
|
||||||
import { getFriendIds } from '../../common/get-friends';
|
import { getFriendIds } from '../../common/get-friends';
|
||||||
|
Loading…
Reference in New Issue
Block a user