Why bother writing your own declaration files? Why not declare a new Request interface that extends Express's Request interface?
Something like this: ts playground
This way you can let the typescript compiler generate the declaration file for you (using either "declaration"="true"
in the tsconfig file or with the --declaration
flag at the tsc CLI; link).