aoc2023/src/utils/index.ts
2024-12-04 11:14:53 -05:00

31 lines
776 B
TypeScript

/**
* Root for your util libraries.
*
* You can import them in the src/template/index.ts,
* or in the specific file.
*
* Note that this repo uses ES Modules, so you have to explicitly specify
* .js extension (yes, .js not .ts - even for TypeScript files)
* for imports that are not imported from node_modules.
*
* For example:
*
* correct:
*
* import _ from 'lodash'
* import myLib from '../utils/myLib.js'
* import { myUtil } from '../utils/index.js'
*
* incorrect:
*
* import _ from 'lodash'
* import myLib from '../utils/myLib.ts'
* import { myUtil } from '../utils/index.ts'
*
* also incorrect:
*
* import _ from 'lodash'
* import myLib from '../utils/myLib'
* import { myUtil } from '../utils'
*
*/