[noImplicitAny: true] src/text

This commit is contained in:
rinsuki 2018-06-17 19:55:39 +09:00
parent 871f886702
commit 8c40917cc2
16 changed files with 166 additions and 44 deletions

View file

@ -1,7 +1,8 @@
import { lib as emojilib } from 'emojilib';
const { lib: emojilib } = require('emojilib');
import { JSDOM } from 'jsdom';
import config from '../config';
import { INote } from '../models/note';
import { TextElement } from './parse';
const handlers: {[key: string]: (window: any, token: any, mentionedRemoteUsers: INote["mentionedRemoteUsers"]) => void} = {
bold({ document }, { bold }) {
@ -90,7 +91,7 @@ const handlers: {[key: string]: (window: any, token: any, mentionedRemoteUsers:
}
};
export default (tokens, mentionedRemoteUsers: INote['mentionedRemoteUsers'] = []) => {
export default (tokens: TextElement[], mentionedRemoteUsers: INote['mentionedRemoteUsers'] = []) => {
const { window } = new JSDOM('');
for (const token of tokens) {