The Firebase docs on how to organize your Functions (https://firebase.google.com/docs/functions/organize-functions) recommend an index.js file with the lines
const foo = require('./foo');
const bar = require('./bar');
exports.foo = foo.foo;
exports.bar = bar.bar;
However, when using Typescript, the default linter settings give the error "Require statement not part of import statement"
Changing the const variables to either import foo = require('./foo'); or import * as foo from './foo' resolves the linter error, but causes the deployed functions to reside at paths like /foo-foo rather than just /foo.
I know I can just disable the linter errors, but I'd like to know what the correct way to handle this is since I'm pretty new to TypeScript.
What is the proper way to handle these exports in typescript such that the deployed URL will be what you expect without using the exact syntax shown in Firebase doc examples?