Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Typescript doesn't compile with strictNullChecks: true #438

Open
lorenx opened this issue Oct 26, 2023 · 0 comments
Open

Typescript doesn't compile with strictNullChecks: true #438

lorenx opened this issue Oct 26, 2023 · 0 comments

Comments

@lorenx
Copy link

lorenx commented Oct 26, 2023

Hello.
I'm using typescript 5.2.2 and actions-on-google 3.0.0 and when I compile using strictNullChecks: true I encounter the errors shown below.
Otherwise, with strictNullChecks: false, everything works fine.

I would like to point out that I'm not using any actionssdk / dialogflow / Conversation stuff, I'm just using smarthome.
Thank you.


Errors with strictNullChecks: true:

node_modules/actions-on-google/dist/service/actionssdk/actionssdk.d.ts:51:45 - error TS2344: Type 'TConversation' does not satisfy the constraint 'Conversation<TUserStorage>'.
  Type 'ActionsSdkConversation<TConvData, TUserStorage>' is not assignable to type 'Conversation<TUserStorage>'.
    Types of property '_init' are incompatible.
      Type 'ConversationOptionsInit<TConvData, TUserStorage>' is not assignable to type 'ConversationOptionsInit<{}, TUserStorage>'.

51     catcher: ExceptionHandler<TUserStorage, TConversation>;
                                               ~~~~~~~~~~~~~

node_modules/actions-on-google/dist/service/actionssdk/actionssdk.d.ts:92:51 - error TS2344: Type 'TConversation' does not satisfy the constraint 'Conversation<TUserStorage>'.
  Type 'ActionsSdkConversation<TConvData, TUserStorage>' is not assignable to type 'Conversation<TUserStorage>'.
    Types of property '_init' are incompatible.
      Type 'ConversationOptionsInit<TConvData, TUserStorage>' is not assignable to type 'ConversationOptionsInit<{}, TUserStorage>'.

92     catch(catcher: ExceptionHandler<TUserStorage, TConversation>): this;
                                                     ~~~~~~~~~~~~~

node_modules/actions-on-google/dist/service/actionssdk/conv.d.ts:58:5 - error TS2416: Property '_init' in type 'ActionsSdkConversation<TConvData, TUserStorage>' is not assignable to the same property in base type 'Conversation<TUserStorage>'.
  Type 'ConversationOptionsInit<TConvData, TUserStorage>' is not assignable to type 'ConversationOptionsInit<{}, TUserStorage>'.
    Type 'TConvData' is not assignable to type '{}'.

58     _init: ConversationOptionsInit<TConvData, TUserStorage>;
       ~~~~~

  node_modules/actions-on-google/dist/service/actionssdk/conv.d.ts:25:45
    25 export declare class ActionsSdkConversation<TConvData = JsonObject, TUserStorage = JsonObject> extends Conversation<TUserStorage> {
                                                   ~~~~~~~~~~~~~~~~~~~~~~
    This type parameter might need an `extends {}` constraint.

node_modules/actions-on-google/dist/service/dialogflow/conv.d.ts:148:5 - error TS2416: Property '_init' in type 'DialogflowConversation<TConvData, TUserStorage, TContexts>' is not assignable to the same property in base type 'Conversation<TUserStorage>'.
  Type 'ConversationOptionsInit<TConvData, TUserStorage>' is not assignable to type 'ConversationOptionsInit<{}, TUserStorage>'.

148     _init: ConversationOptionsInit<TConvData, TUserStorage>;
        ~~~~~

node_modules/actions-on-google/dist/service/dialogflow/dialogflow.d.ts:46:45 - error TS2344: Type 'TConversation' does not satisfy the constraint 'Conversation<TUserStorage>'.
  Type 'DialogflowConversation<TConvData, TUserStorage, TContexts>' is not assignable to type 'Conversation<TUserStorage>'.
    Types of property '_init' are incompatible.
      Type 'ConversationOptionsInit<TConvData, TUserStorage>' is not assignable to type 'ConversationOptionsInit<{}, TUserStorage>'.

46     catcher: ExceptionHandler<TUserStorage, TConversation>;
                                               ~~~~~~~~~~~~~

node_modules/actions-on-google/dist/service/dialogflow/dialogflow.d.ts:136:51 - error TS2344: Type 'TConversation' does not satisfy the constraint 'Conversation<TUserStorage>'.
  Type 'DialogflowConversation<TConvData, TUserStorage, TContexts>' is not assignable to type 'Conversation<TUserStorage>'.
    Types of property '_init' are incompatible.
      Type 'ConversationOptionsInit<TConvData, TUserStorage>' is not assignable to type 'ConversationOptionsInit<{}, TUserStorage>'.

136     catch(catcher: ExceptionHandler<TUserStorage, TConversation>): this;
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant