refactor(frontend): give local variable to explicit type annotation to avoid TS7043 (#12495)
* refactor: give local variable to explicit type annotation to avoid TS7043 * chore: fix lint error
This commit is contained in:
parent
28cb0fc70b
commit
47a10f6a6d
@ -103,7 +103,7 @@ export default function(props: MfmProps) {
|
|||||||
|
|
||||||
case 'fn': {
|
case 'fn': {
|
||||||
// TODO: CSSを文字列で組み立てていくと token.props.args.~~~ 経由でCSSインジェクションできるのでよしなにやる
|
// TODO: CSSを文字列で組み立てていくと token.props.args.~~~ 経由でCSSインジェクションできるのでよしなにやる
|
||||||
let style;
|
let style: string | undefined;
|
||||||
switch (token.props.name) {
|
switch (token.props.name) {
|
||||||
case 'tada': {
|
case 'tada': {
|
||||||
const speed = validTime(token.props.args.speed) ?? '1s';
|
const speed = validTime(token.props.args.speed) ?? '1s';
|
||||||
@ -268,7 +268,7 @@ export default function(props: MfmProps) {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (style == null) {
|
if (style === undefined) {
|
||||||
return h('span', {}, ['$[', token.props.name, ' ', ...genEl(token.children, scale), ']']);
|
return h('span', {}, ['$[', token.props.name, ' ', ...genEl(token.children, scale), ']']);
|
||||||
} else {
|
} else {
|
||||||
return h('span', {
|
return h('span', {
|
||||||
|
Loading…
Reference in New Issue
Block a user