Skip to content

Conversation

@fletcherist
Copy link
Owner

No description provided.

context.data.request.command.toLowerCase() : '';
const { relevanceProvider = getLevenshteinRelevance } = params;
return (context: Context) => {
const commandLower = context.data.request.command

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code duplicates at least 3 times, maybe it's better to implement function for this operation

headers: {
'Authorization': `OAuth ${this._oAuthToken}`,
Authorization: `OAuth ${this._oAuthToken}`,
'Content-type': 'application/json',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be a 'Content-Type' header with capital T

@@ -0,0 +1,78 @@
declare module 'alice-renderer' {
Copy link

@shining-mind shining-mind May 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Declared Response interface is not-compatible with ApiResponseBody as a result tests won't work with the new reply.

I've tried to fix this issue in forked repo by declaring API as ambient module and importing API types here, but I can't find a good solution how to ship this types with NPM package. It seems that *.d.ts files added to dist folder won't be resolved by the typescript compiler if package is used as dependency.

Copy link

@shining-mind shining-mind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to find a way how to ship alice-renderer types declaration with the package, so projects which are written in TypeScript could compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants