diff --git a/types/index.d.ts b/types/index.d.ts index 85a7916b..e56afd80 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -668,6 +668,13 @@ declare namespace Fig { */ generateSpec?: (tokens: string[], executeCommand: ExecuteCommandFunction) => Promise; + /** + * Generating a spec can be expensive, but due to current guarantees they are not cached. + * This function generates a cache key which is used to cache the result of generateSpec. + * If `undefined` is returned, the cache will not be used. + */ + generateSpecCacheKey?: Function<{ tokens: string[] }, string | undefined> | string; + /** * Configure how the autocomplete engine will map the raw tokens to a given completion spec. *