Issue with tsconfig in strict mode and Type (…) is not assignable to type (…)What are POD types in C++?What's the canonical way to check for type in Python?How to determine a Python variable's type?What are the differences between type() and isinstance()?How to check if type of a variable is string?Typescript error TS2322: Union type in function return valuesUsing mysql types in typescriptVisual Studio Code Typescript not compiling on saveAngular 5 Jasmine issue in VS codeTypeScript project with references

Can I change the license of a forked project to the MIT if the license of the parent project has changed from the GPL to the MIT?

Why force the nose of 737 Max down in the first place?

What language is Raven using for her attack in the new 52?

Why would anyone ever invest in a cash-only etf?

Why did some Apollo missions carry a grenade launcher?

Assuring luggage isn't lost with short layover

Japanese reading of an integer

Where can I find a clear explanation (brief derivation) of N(d1) and N(d2)?

Composing fill in the blanks

What are the closest international airports in different countries?

Why do they sell Cat 5 Ethernet splitters if you can’t split the signal?

Irreducible factors of primitive permutation group representation

Is it okay for me to decline a project on ethical grounds?

If Trump gets impeached, how long would Pence be president?

Must a song using the A minor scale begin or end with an Am chord? If not, how can I tell what the scale is?

Is there an antonym(a complementary antonym) for "spicy" or "hot" regarding food (I do NOT mean "seasoned" but "hot")?

How did the Sinclair compare on price with the C64 in the UK?

How does one get an animal off of the Altar surreptitiously?

Why did Windows 95 crash the whole system but newer Windows only crashed programs?

How likely is fragmentation on a table with 40000 products likely to affect performance

What do you call a flexible diving platform?

Exploiting the delay when a festival ticket is scanned

Dual-national, returning to US the day the US Passport expires; can he check in with airline on Dutch passport but reenter with expiring US passport?

Going from a circuit to the quantum state output of the circuit



Issue with tsconfig in strict mode and Type (…) is not assignable to type (…)


What are POD types in C++?What's the canonical way to check for type in Python?How to determine a Python variable's type?What are the differences between type() and isinstance()?How to check if type of a variable is string?Typescript error TS2322: Union type in function return valuesUsing mysql types in typescriptVisual Studio Code Typescript not compiling on saveAngular 5 Jasmine issue in VS codeTypeScript project with references






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I know there are quite a lot of question about this, I did read most of them (I guess) and they helped me having a better understanding of this error, and how to solve it in most cases.



However I am facing one I could not resolves by myself, so apologies if SO is not the good place for this question (I guess this could be a dupe since there is already questions about this issue, but I did not found any that helped me to solve this "particular case").



I have the following piece of code :



import Request from 'express'
import multer from 'multer'
import path from 'path'

class ImageMiddleware

// ...

private storage (folder: string): multer.StorageEngine
return multer.diskStorage( null, destination: string) => void): void =>
callback(
null,
`$file.fieldname`
+ `-`
+ `$Date.now()`
+ `$req.user.id`
+ `$path.extname(file.originalname)`
)
,
)


// ...


export default new ImageMiddleware()


With this tsconfig.json :




"compilerOptions":
"target": "ES6",
"module": "commonjs",
"outDir": "./dist/",
"sourceMap": true,
"removeComments": true,
"pretty": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"alwaysStrict": true,
"noImplicitThis": true,
"noImplicitAny": true,
"allowUnreachableCode": false,
"esModuleInterop": true,
"strict": true
,
"exclude": ["**/spec/*.spec.ts", "./node_modules"]



But when running ./node_modules/typescript/bin/tsc I have the following error :



services/middlewares/image/image.middleware.ts:112:13 - error TS2322: Type '(_req: Request, _file: File, callback: (error: Error | null, destination: string) => void) => void' is not assignable to type 'string | ((req: Request, file: File, callback: (error: Error | null, destination: string) => void) => void) | undefined'.
Type '(_req: Request, _file: File, callback: (error: Error | null, destination: string) => void) => void' is not assignable to type '(req: Request, file: File, callback: (error: Error | null, destination: string) => void) => void'.
Types of parameters '_req' and 'req' are incompatible.
Type 'Request' is missing the following properties from type 'Request': get, header, accepts, acceptsCharsets, and 71 more.

112 destination: (
~~~~~~~~~~~

node_modules/@types/multer/index.d.ts:59:9
59 destination?: string | ((req: Express.Request, file: Express.Multer.File, callback: (error: Error | null, destination: string) => void) => void);
~~~~~~~~~~~
The expected type comes from property 'destination' which is declared here on type 'DiskStorageOptions'


So I guess that the ): void => { line is wrong, hence I tried a lot of stuff to debug it but did not find anything successfull.



The output of ./node_modules/typescript/bin/tsc -v is Version 3.3.4000



Any help would be welcome, please let me know if I forgot some relevant informations










share|improve this question
































    0















    I know there are quite a lot of question about this, I did read most of them (I guess) and they helped me having a better understanding of this error, and how to solve it in most cases.



    However I am facing one I could not resolves by myself, so apologies if SO is not the good place for this question (I guess this could be a dupe since there is already questions about this issue, but I did not found any that helped me to solve this "particular case").



    I have the following piece of code :



    import Request from 'express'
    import multer from 'multer'
    import path from 'path'

    class ImageMiddleware

    // ...

    private storage (folder: string): multer.StorageEngine
    return multer.diskStorage( null, destination: string) => void): void =>
    callback(
    null,
    `$file.fieldname`
    + `-`
    + `$Date.now()`
    + `$req.user.id`
    + `$path.extname(file.originalname)`
    )
    ,
    )


    // ...


    export default new ImageMiddleware()


    With this tsconfig.json :




    "compilerOptions":
    "target": "ES6",
    "module": "commonjs",
    "outDir": "./dist/",
    "sourceMap": true,
    "removeComments": true,
    "pretty": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "alwaysStrict": true,
    "noImplicitThis": true,
    "noImplicitAny": true,
    "allowUnreachableCode": false,
    "esModuleInterop": true,
    "strict": true
    ,
    "exclude": ["**/spec/*.spec.ts", "./node_modules"]



    But when running ./node_modules/typescript/bin/tsc I have the following error :



    services/middlewares/image/image.middleware.ts:112:13 - error TS2322: Type '(_req: Request, _file: File, callback: (error: Error | null, destination: string) => void) => void' is not assignable to type 'string | ((req: Request, file: File, callback: (error: Error | null, destination: string) => void) => void) | undefined'.
    Type '(_req: Request, _file: File, callback: (error: Error | null, destination: string) => void) => void' is not assignable to type '(req: Request, file: File, callback: (error: Error | null, destination: string) => void) => void'.
    Types of parameters '_req' and 'req' are incompatible.
    Type 'Request' is missing the following properties from type 'Request': get, header, accepts, acceptsCharsets, and 71 more.

    112 destination: (
    ~~~~~~~~~~~

    node_modules/@types/multer/index.d.ts:59:9
    59 destination?: string | ((req: Express.Request, file: Express.Multer.File, callback: (error: Error | null, destination: string) => void) => void);
    ~~~~~~~~~~~
    The expected type comes from property 'destination' which is declared here on type 'DiskStorageOptions'


    So I guess that the ): void => { line is wrong, hence I tried a lot of stuff to debug it but did not find anything successfull.



    The output of ./node_modules/typescript/bin/tsc -v is Version 3.3.4000



    Any help would be welcome, please let me know if I forgot some relevant informations










    share|improve this question




























      0












      0








      0








      I know there are quite a lot of question about this, I did read most of them (I guess) and they helped me having a better understanding of this error, and how to solve it in most cases.



      However I am facing one I could not resolves by myself, so apologies if SO is not the good place for this question (I guess this could be a dupe since there is already questions about this issue, but I did not found any that helped me to solve this "particular case").



      I have the following piece of code :



      import Request from 'express'
      import multer from 'multer'
      import path from 'path'

      class ImageMiddleware

      // ...

      private storage (folder: string): multer.StorageEngine
      return multer.diskStorage( null, destination: string) => void): void =>
      callback(
      null,
      `$file.fieldname`
      + `-`
      + `$Date.now()`
      + `$req.user.id`
      + `$path.extname(file.originalname)`
      )
      ,
      )


      // ...


      export default new ImageMiddleware()


      With this tsconfig.json :




      "compilerOptions":
      "target": "ES6",
      "module": "commonjs",
      "outDir": "./dist/",
      "sourceMap": true,
      "removeComments": true,
      "pretty": true,
      "noUnusedLocals": true,
      "noUnusedParameters": true,
      "alwaysStrict": true,
      "noImplicitThis": true,
      "noImplicitAny": true,
      "allowUnreachableCode": false,
      "esModuleInterop": true,
      "strict": true
      ,
      "exclude": ["**/spec/*.spec.ts", "./node_modules"]



      But when running ./node_modules/typescript/bin/tsc I have the following error :



      services/middlewares/image/image.middleware.ts:112:13 - error TS2322: Type '(_req: Request, _file: File, callback: (error: Error | null, destination: string) => void) => void' is not assignable to type 'string | ((req: Request, file: File, callback: (error: Error | null, destination: string) => void) => void) | undefined'.
      Type '(_req: Request, _file: File, callback: (error: Error | null, destination: string) => void) => void' is not assignable to type '(req: Request, file: File, callback: (error: Error | null, destination: string) => void) => void'.
      Types of parameters '_req' and 'req' are incompatible.
      Type 'Request' is missing the following properties from type 'Request': get, header, accepts, acceptsCharsets, and 71 more.

      112 destination: (
      ~~~~~~~~~~~

      node_modules/@types/multer/index.d.ts:59:9
      59 destination?: string | ((req: Express.Request, file: Express.Multer.File, callback: (error: Error | null, destination: string) => void) => void);
      ~~~~~~~~~~~
      The expected type comes from property 'destination' which is declared here on type 'DiskStorageOptions'


      So I guess that the ): void => { line is wrong, hence I tried a lot of stuff to debug it but did not find anything successfull.



      The output of ./node_modules/typescript/bin/tsc -v is Version 3.3.4000



      Any help would be welcome, please let me know if I forgot some relevant informations










      share|improve this question
















      I know there are quite a lot of question about this, I did read most of them (I guess) and they helped me having a better understanding of this error, and how to solve it in most cases.



      However I am facing one I could not resolves by myself, so apologies if SO is not the good place for this question (I guess this could be a dupe since there is already questions about this issue, but I did not found any that helped me to solve this "particular case").



      I have the following piece of code :



      import Request from 'express'
      import multer from 'multer'
      import path from 'path'

      class ImageMiddleware

      // ...

      private storage (folder: string): multer.StorageEngine
      return multer.diskStorage( null, destination: string) => void): void =>
      callback(
      null,
      `$file.fieldname`
      + `-`
      + `$Date.now()`
      + `$req.user.id`
      + `$path.extname(file.originalname)`
      )
      ,
      )


      // ...


      export default new ImageMiddleware()


      With this tsconfig.json :




      "compilerOptions":
      "target": "ES6",
      "module": "commonjs",
      "outDir": "./dist/",
      "sourceMap": true,
      "removeComments": true,
      "pretty": true,
      "noUnusedLocals": true,
      "noUnusedParameters": true,
      "alwaysStrict": true,
      "noImplicitThis": true,
      "noImplicitAny": true,
      "allowUnreachableCode": false,
      "esModuleInterop": true,
      "strict": true
      ,
      "exclude": ["**/spec/*.spec.ts", "./node_modules"]



      But when running ./node_modules/typescript/bin/tsc I have the following error :



      services/middlewares/image/image.middleware.ts:112:13 - error TS2322: Type '(_req: Request, _file: File, callback: (error: Error | null, destination: string) => void) => void' is not assignable to type 'string | ((req: Request, file: File, callback: (error: Error | null, destination: string) => void) => void) | undefined'.
      Type '(_req: Request, _file: File, callback: (error: Error | null, destination: string) => void) => void' is not assignable to type '(req: Request, file: File, callback: (error: Error | null, destination: string) => void) => void'.
      Types of parameters '_req' and 'req' are incompatible.
      Type 'Request' is missing the following properties from type 'Request': get, header, accepts, acceptsCharsets, and 71 more.

      112 destination: (
      ~~~~~~~~~~~

      node_modules/@types/multer/index.d.ts:59:9
      59 destination?: string | ((req: Express.Request, file: Express.Multer.File, callback: (error: Error | null, destination: string) => void) => void);
      ~~~~~~~~~~~
      The expected type comes from property 'destination' which is declared here on type 'DiskStorageOptions'


      So I guess that the ): void => { line is wrong, hence I tried a lot of stuff to debug it but did not find anything successfull.



      The output of ./node_modules/typescript/bin/tsc -v is Version 3.3.4000



      Any help would be welcome, please let me know if I forgot some relevant informations







      typescript types multer tsconfig






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 26 at 20:26







      L. Faros

















      asked Mar 26 at 19:32









      L. FarosL. Faros

      3133 silver badges15 bronze badges




      3133 silver badges15 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          0














          Because this error is in node_modules the only hope of fixing it is a pull request to the typings repository.



          For now to silence the error turn "skipLibCheck": true in tsconfig.



          EDIT: Sorry misread where error was coming from.



          "Types of parameters '_req' and 'req' are incompatible."
          I Suspect if you're using express you've ended up with two types for "Request" there is one in the standard typescript library which 1 function is typed with and another type for "Request" that exists in express that express uses.






          share|improve this answer



























          • Well, I might be mistaken but I don't think the error is coming from the node_modules (I did not post the last version of tsconfig.json, apologies, but I have : "exclude": ["**/spec/*.spec.ts", "./node_modules"] I'll edit this in the question. Furthermore, the error is clearly on my file services/middlewares/image/image.middleware.ts at line 112 I think it's just a (nice) hint from typescript to tell me wich definition file to check. This file is in node_modules so it point to that. I did try "skipLibCheck": true tho but the output is still the same

            – L. Faros
            Mar 26 at 20:25












          • Oh sorry must have misread where the error was coming from, i'll edit

            – Shanon Jackson
            Mar 26 at 20:26











          • Also the fact that the node_modules error is slightly indented also seems to me that this just is typescrypt printing some stacktrace to help me, sadly I did not yet find how to put the right type for this particular definition :(

            – L. Faros
            Mar 26 at 20:30











          • iv'e posted a edit*

            – Shanon Jackson
            Mar 26 at 20:30












          • Thanks for your help :) Not sure how to load the right module tho. I load import Request from 'express' so if multer is using another type of Request how can I load it ? I tried something like _req: Express.Multer. but it only autocompletes to Express.Multer.File

            – L. Faros
            Mar 26 at 20:35










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55364965%2fissue-with-tsconfig-in-strict-mode-and-type-is-not-assignable-to-type%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Because this error is in node_modules the only hope of fixing it is a pull request to the typings repository.



          For now to silence the error turn "skipLibCheck": true in tsconfig.



          EDIT: Sorry misread where error was coming from.



          "Types of parameters '_req' and 'req' are incompatible."
          I Suspect if you're using express you've ended up with two types for "Request" there is one in the standard typescript library which 1 function is typed with and another type for "Request" that exists in express that express uses.






          share|improve this answer



























          • Well, I might be mistaken but I don't think the error is coming from the node_modules (I did not post the last version of tsconfig.json, apologies, but I have : "exclude": ["**/spec/*.spec.ts", "./node_modules"] I'll edit this in the question. Furthermore, the error is clearly on my file services/middlewares/image/image.middleware.ts at line 112 I think it's just a (nice) hint from typescript to tell me wich definition file to check. This file is in node_modules so it point to that. I did try "skipLibCheck": true tho but the output is still the same

            – L. Faros
            Mar 26 at 20:25












          • Oh sorry must have misread where the error was coming from, i'll edit

            – Shanon Jackson
            Mar 26 at 20:26











          • Also the fact that the node_modules error is slightly indented also seems to me that this just is typescrypt printing some stacktrace to help me, sadly I did not yet find how to put the right type for this particular definition :(

            – L. Faros
            Mar 26 at 20:30











          • iv'e posted a edit*

            – Shanon Jackson
            Mar 26 at 20:30












          • Thanks for your help :) Not sure how to load the right module tho. I load import Request from 'express' so if multer is using another type of Request how can I load it ? I tried something like _req: Express.Multer. but it only autocompletes to Express.Multer.File

            – L. Faros
            Mar 26 at 20:35















          0














          Because this error is in node_modules the only hope of fixing it is a pull request to the typings repository.



          For now to silence the error turn "skipLibCheck": true in tsconfig.



          EDIT: Sorry misread where error was coming from.



          "Types of parameters '_req' and 'req' are incompatible."
          I Suspect if you're using express you've ended up with two types for "Request" there is one in the standard typescript library which 1 function is typed with and another type for "Request" that exists in express that express uses.






          share|improve this answer



























          • Well, I might be mistaken but I don't think the error is coming from the node_modules (I did not post the last version of tsconfig.json, apologies, but I have : "exclude": ["**/spec/*.spec.ts", "./node_modules"] I'll edit this in the question. Furthermore, the error is clearly on my file services/middlewares/image/image.middleware.ts at line 112 I think it's just a (nice) hint from typescript to tell me wich definition file to check. This file is in node_modules so it point to that. I did try "skipLibCheck": true tho but the output is still the same

            – L. Faros
            Mar 26 at 20:25












          • Oh sorry must have misread where the error was coming from, i'll edit

            – Shanon Jackson
            Mar 26 at 20:26











          • Also the fact that the node_modules error is slightly indented also seems to me that this just is typescrypt printing some stacktrace to help me, sadly I did not yet find how to put the right type for this particular definition :(

            – L. Faros
            Mar 26 at 20:30











          • iv'e posted a edit*

            – Shanon Jackson
            Mar 26 at 20:30












          • Thanks for your help :) Not sure how to load the right module tho. I load import Request from 'express' so if multer is using another type of Request how can I load it ? I tried something like _req: Express.Multer. but it only autocompletes to Express.Multer.File

            – L. Faros
            Mar 26 at 20:35













          0












          0








          0







          Because this error is in node_modules the only hope of fixing it is a pull request to the typings repository.



          For now to silence the error turn "skipLibCheck": true in tsconfig.



          EDIT: Sorry misread where error was coming from.



          "Types of parameters '_req' and 'req' are incompatible."
          I Suspect if you're using express you've ended up with two types for "Request" there is one in the standard typescript library which 1 function is typed with and another type for "Request" that exists in express that express uses.






          share|improve this answer















          Because this error is in node_modules the only hope of fixing it is a pull request to the typings repository.



          For now to silence the error turn "skipLibCheck": true in tsconfig.



          EDIT: Sorry misread where error was coming from.



          "Types of parameters '_req' and 'req' are incompatible."
          I Suspect if you're using express you've ended up with two types for "Request" there is one in the standard typescript library which 1 function is typed with and another type for "Request" that exists in express that express uses.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 26 at 20:28

























          answered Mar 26 at 20:14









          Shanon JacksonShanon Jackson

          1,6774 silver badges13 bronze badges




          1,6774 silver badges13 bronze badges















          • Well, I might be mistaken but I don't think the error is coming from the node_modules (I did not post the last version of tsconfig.json, apologies, but I have : "exclude": ["**/spec/*.spec.ts", "./node_modules"] I'll edit this in the question. Furthermore, the error is clearly on my file services/middlewares/image/image.middleware.ts at line 112 I think it's just a (nice) hint from typescript to tell me wich definition file to check. This file is in node_modules so it point to that. I did try "skipLibCheck": true tho but the output is still the same

            – L. Faros
            Mar 26 at 20:25












          • Oh sorry must have misread where the error was coming from, i'll edit

            – Shanon Jackson
            Mar 26 at 20:26











          • Also the fact that the node_modules error is slightly indented also seems to me that this just is typescrypt printing some stacktrace to help me, sadly I did not yet find how to put the right type for this particular definition :(

            – L. Faros
            Mar 26 at 20:30











          • iv'e posted a edit*

            – Shanon Jackson
            Mar 26 at 20:30












          • Thanks for your help :) Not sure how to load the right module tho. I load import Request from 'express' so if multer is using another type of Request how can I load it ? I tried something like _req: Express.Multer. but it only autocompletes to Express.Multer.File

            – L. Faros
            Mar 26 at 20:35

















          • Well, I might be mistaken but I don't think the error is coming from the node_modules (I did not post the last version of tsconfig.json, apologies, but I have : "exclude": ["**/spec/*.spec.ts", "./node_modules"] I'll edit this in the question. Furthermore, the error is clearly on my file services/middlewares/image/image.middleware.ts at line 112 I think it's just a (nice) hint from typescript to tell me wich definition file to check. This file is in node_modules so it point to that. I did try "skipLibCheck": true tho but the output is still the same

            – L. Faros
            Mar 26 at 20:25












          • Oh sorry must have misread where the error was coming from, i'll edit

            – Shanon Jackson
            Mar 26 at 20:26











          • Also the fact that the node_modules error is slightly indented also seems to me that this just is typescrypt printing some stacktrace to help me, sadly I did not yet find how to put the right type for this particular definition :(

            – L. Faros
            Mar 26 at 20:30











          • iv'e posted a edit*

            – Shanon Jackson
            Mar 26 at 20:30












          • Thanks for your help :) Not sure how to load the right module tho. I load import Request from 'express' so if multer is using another type of Request how can I load it ? I tried something like _req: Express.Multer. but it only autocompletes to Express.Multer.File

            – L. Faros
            Mar 26 at 20:35
















          Well, I might be mistaken but I don't think the error is coming from the node_modules (I did not post the last version of tsconfig.json, apologies, but I have : "exclude": ["**/spec/*.spec.ts", "./node_modules"] I'll edit this in the question. Furthermore, the error is clearly on my file services/middlewares/image/image.middleware.ts at line 112 I think it's just a (nice) hint from typescript to tell me wich definition file to check. This file is in node_modules so it point to that. I did try "skipLibCheck": true tho but the output is still the same

          – L. Faros
          Mar 26 at 20:25






          Well, I might be mistaken but I don't think the error is coming from the node_modules (I did not post the last version of tsconfig.json, apologies, but I have : "exclude": ["**/spec/*.spec.ts", "./node_modules"] I'll edit this in the question. Furthermore, the error is clearly on my file services/middlewares/image/image.middleware.ts at line 112 I think it's just a (nice) hint from typescript to tell me wich definition file to check. This file is in node_modules so it point to that. I did try "skipLibCheck": true tho but the output is still the same

          – L. Faros
          Mar 26 at 20:25














          Oh sorry must have misread where the error was coming from, i'll edit

          – Shanon Jackson
          Mar 26 at 20:26





          Oh sorry must have misread where the error was coming from, i'll edit

          – Shanon Jackson
          Mar 26 at 20:26













          Also the fact that the node_modules error is slightly indented also seems to me that this just is typescrypt printing some stacktrace to help me, sadly I did not yet find how to put the right type for this particular definition :(

          – L. Faros
          Mar 26 at 20:30





          Also the fact that the node_modules error is slightly indented also seems to me that this just is typescrypt printing some stacktrace to help me, sadly I did not yet find how to put the right type for this particular definition :(

          – L. Faros
          Mar 26 at 20:30













          iv'e posted a edit*

          – Shanon Jackson
          Mar 26 at 20:30






          iv'e posted a edit*

          – Shanon Jackson
          Mar 26 at 20:30














          Thanks for your help :) Not sure how to load the right module tho. I load import Request from 'express' so if multer is using another type of Request how can I load it ? I tried something like _req: Express.Multer. but it only autocompletes to Express.Multer.File

          – L. Faros
          Mar 26 at 20:35





          Thanks for your help :) Not sure how to load the right module tho. I load import Request from 'express' so if multer is using another type of Request how can I load it ? I tried something like _req: Express.Multer. but it only autocompletes to Express.Multer.File

          – L. Faros
          Mar 26 at 20:35








          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55364965%2fissue-with-tsconfig-in-strict-mode-and-type-is-not-assignable-to-type%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript