Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3 #120

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

V3 #120

wants to merge 7 commits into from

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

@@ -90,11 +82,11 @@ export class ImagesApi implements IImagesApi {
const response = await fetch(url, {
method: method,
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

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.

None yet

2 participants