Skip to content

Commit

Permalink
use any for avoiding compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshinorin committed Feb 28, 2023
1 parent ca12570 commit e0ee480
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/extend/tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class NunjucksTag {
return this._run(context, args, '');
}

_run(context, args, body) {
_run(context, args, body): any {
return Reflect.apply(this.fn, context.ctx, [args, body]);
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/hexo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ class Hexo extends EventEmitter {

const c = this.extend.console.get(name);

if (c) return Reflect.apply(c, this, [args]).asCallback(callback);
if (c) return (Reflect.apply(c, this, [args]) as any).asCallback(callback);
return Promise.reject(new Error(`Console \`${name}\` has not been registered yet!`));
}

Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/console/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function deployConsole(args) {

this.log.info('Deploying: %s', magenta(type));

return Reflect.apply(deployers[type], this, [{ ...item, ...args }]).then(() => {
return (Reflect.apply(deployers[type], this, [{ ...item, ...args }]) as any).then(() => {
this.log.info('Deploy done: %s', magenta(type));
});
}).then(() => {
Expand Down
3 changes: 1 addition & 2 deletions lib/plugins/filter/before_generate/render_post.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import Promise from 'bluebird';
import warehouse from 'warehouse';

function renderPostFilter(data) {
const renderPosts = model => {
const posts = model.toArray().filter(post => post.content == null);

return Promise.map(posts, (post: warehouse.Schema) => {
return Promise.map(posts, (post: any) => {
post.content = post._content;
post.site = {data};

Expand Down

0 comments on commit e0ee480

Please sign in to comment.