Skip to content

Commit e87c03f

Browse files
committed
Update TSDoc for Edge Dictionaries
1 parent f5afe9c commit e87c03f

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

types/dictionary.d.ts

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,28 @@ declare module 'fastly:dictionary' {
44
*
55
* **Note**: Can only be used when processing requests, not during build-time initialization.
66
*
7-
* @deprecated This Class is deprecated, it has been renamed to ConfigStore and can be imported via `import { ConfigStore } from 'fastly:config-store'`
7+
* @deprecated Use {@link ConfigStore} from `'fastly:config-store'` instead.
88
*/
99
class Dictionary {
1010
/**
11-
* Creates a new Dictionary object, and opens an edge dictionary to query
11+
* Creates a new Dictionary object, providing access to the named
12+
* [Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries).
1213
*
13-
* @throws {Error} Throws an `Error` if no Dictionary exists with the provided name
14-
*
15-
* @deprecated This constructor is deprecated, it has been renamed to ConfigStore and can be imported via `import { ConfigStore } from 'fastly:config-store'`
14+
* @param name The name of the Edge Dictionary.
15+
* @throws {TypeError} If no Dictionary exists with the provided name.
16+
* @throws {TypeError} If the provided name is empty, longer than 255 characters,
17+
* does not start with an ASCII alphabetical character, or contains characters
18+
* other than ASCII alphanumerics, underscores, and spaces.
19+
* @deprecated Use {@link ConfigStore} from `'fastly:config-store'` instead.
1620
*/
1721
constructor(name: string);
1822
/**
19-
* Get a value for a key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.
20-
*
21-
* @throws {TypeError} Throws an `TypeError` if the provided key is longer than 256 characters.
23+
* Get a value for a key in the Dictionary. If the provided key does not
24+
* exist in the Dictionary then this returns `null`.
2225
*
23-
* @deprecated This Class is deprecated, the Class has been renamed to ConfigStore and can be imported via `import { ConfigStore } from 'fastly:config-store'`
26+
* @param key The key to retrieve.
27+
* @throws {TypeError} If the provided key is empty or longer than 255 characters.
28+
* @deprecated Use {@link ConfigStore} from `'fastly:config-store'` instead.
2429
*/
2530
get(key: string): string | null;
2631
}

0 commit comments

Comments
 (0)