We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
reconstructRegex
1 parent e6db661 commit c224f7bCopy full SHA for c224f7b
1 file changed
src/utils.ts
@@ -119,11 +119,11 @@ export function ensureDirExists(dir: string) {
119
* Reconstruct the regex pattern because vscode doesn't like the regex pattern as a string,
120
* or some patterns are not working as expected.
121
*
122
- * @param obj The object
123
- * @param key The key to check in the object
+ * @param {unknown} obj The object
+ * @param {string} key The key to check in the object
124
* @returns {RegExp} The reconstructed regex pattern.
125
*/
126
-export function reconstructRegex(obj: unknown, key: string) {
+export function reconstructRegex(obj: unknown, key: string): RegExp {
127
// If key has a "pattern" key, then it's an object...
128
if (Object.hasOwn(obj[key], "pattern")) {
129
return new RegExp(obj[key].pattern);
0 commit comments