Skip to content

Commit 275a497

Browse files
committed
docs: add common issue and fix for Advanced Services TSC checks
1 parent 3ebacfe commit 275a497

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

GEMINI.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,4 +283,11 @@ function find(id) { ... }
283283
### Common Issues & Fixes
284284

285285
- **"Property 'x' does not exist on type 'Object'"**: This usually means you are accessing a property on a generic object. Define a `@typedef` for that object structure.
286-
- **Implicit 'any'**: If you see "Parameter 'x' implicitly has an 'any' type", it means you forgot a JSDoc `@param` tag. Add it to fix the error.
286+
- **Implicit 'any'**: If you see "Parameter 'x' implicitly has an 'any' type", it means you forgot a JSDoc `@param` tag. Add it to fix the error.
287+
- **Advanced Services**: To fix errors with these globals, add a simple check and throw an error telling the developer to add the appropriate service. An example is below. Prefer this check at the global scope if used multiple times.
288+
289+
```js
290+
if (!AdminDirectory) {
291+
throw new Error('Enable the AdminDirectory Advanced Service.');
292+
}
293+
```

0 commit comments

Comments
 (0)