Skip to content

Commit ea28656

Browse files
committed
Revert eslint change to fix firestore docs????
1 parent a516771 commit ea28656

13 files changed

+391
-159
lines changed

common/api-review/firestore.api.md

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -375,14 +375,15 @@ export interface LoadBundleTaskProgress {
375375
export { LogLevel }
376376

377377
// @public
378-
export type MemoryCacheSettings = {
378+
export interface MemoryCacheSettings {
379379
garbageCollector?: MemoryGarbageCollector;
380-
};
380+
}
381381

382382
// @public
383-
export type MemoryEagerGarbageCollector = {
383+
export interface MemoryEagerGarbageCollector {
384+
// (undocumented)
384385
kind: 'memoryEager';
385-
};
386+
}
386387

387388
// @public
388389
export function memoryEagerGarbageCollector(): MemoryEagerGarbageCollector;
@@ -391,17 +392,19 @@ export function memoryEagerGarbageCollector(): MemoryEagerGarbageCollector;
391392
export type MemoryGarbageCollector = MemoryEagerGarbageCollector | MemoryLruGarbageCollector;
392393

393394
// @public
394-
export type MemoryLocalCache = {
395+
export interface MemoryLocalCache {
396+
// (undocumented)
395397
kind: 'memory';
396-
};
398+
}
397399

398400
// @public
399401
export function memoryLocalCache(settings?: MemoryCacheSettings): MemoryLocalCache;
400402

401403
// @public
402-
export type MemoryLruGarbageCollector = {
404+
export interface MemoryLruGarbageCollector {
405+
// (undocumented)
403406
kind: 'memoryLru';
404-
};
407+
}
405408

406409
// @public
407410
export function memoryLruGarbageCollector(settings?: {
@@ -491,39 +494,42 @@ export class PersistentCacheIndexManager {
491494
}
492495

493496
// @public
494-
export type PersistentCacheSettings = {
497+
export interface PersistentCacheSettings {
495498
cacheSizeBytes?: number;
496499
tabManager?: PersistentTabManager;
497-
};
500+
}
498501

499502
// @public
500-
export type PersistentLocalCache = {
503+
export interface PersistentLocalCache {
504+
// (undocumented)
501505
kind: 'persistent';
502-
};
506+
}
503507

504508
// @public
505509
export function persistentLocalCache(settings?: PersistentCacheSettings): PersistentLocalCache;
506510

507511
// @public
508-
export type PersistentMultipleTabManager = {
512+
export interface PersistentMultipleTabManager {
513+
// (undocumented)
509514
kind: 'PersistentMultipleTab';
510-
};
515+
}
511516

512517
// @public
513518
export function persistentMultipleTabManager(): PersistentMultipleTabManager;
514519

515520
// @public
516-
export type PersistentSingleTabManager = {
521+
export interface PersistentSingleTabManager {
522+
// (undocumented)
517523
kind: 'persistentSingleTab';
518-
};
524+
}
519525

520526
// @public
521527
export function persistentSingleTabManager(settings: PersistentSingleTabManagerSettings | undefined): PersistentSingleTabManager;
522528

523529
// @public
524-
export type PersistentSingleTabManagerSettings = {
530+
export interface PersistentSingleTabManagerSettings {
525531
forceOwnership?: boolean;
526-
};
532+
}
527533

528534
// @public
529535
export type PersistentTabManager = PersistentSingleTabManager | PersistentMultipleTabManager;

config/.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ module.exports = {
174174
}
175175
}
176176
],
177+
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
177178
'@typescript-eslint/explicit-member-accessibility': [
178179
'error',
179180
{

docs-devsite/_toc.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,28 @@ toc:
245245
path: /docs/reference/js/firestore_.loadbundletask.md
246246
- title: LoadBundleTaskProgress
247247
path: /docs/reference/js/firestore_.loadbundletaskprogress.md
248+
- title: MemoryCacheSettings
249+
path: /docs/reference/js/firestore_.memorycachesettings.md
250+
- title: MemoryEagerGarbageCollector
251+
path: /docs/reference/js/firestore_.memoryeagergarbagecollector.md
252+
- title: MemoryLocalCache
253+
path: /docs/reference/js/firestore_.memorylocalcache.md
254+
- title: MemoryLruGarbageCollector
255+
path: /docs/reference/js/firestore_.memorylrugarbagecollector.md
248256
- title: PersistenceSettings
249257
path: /docs/reference/js/firestore_.persistencesettings.md
250258
- title: PersistentCacheIndexManager
251259
path: /docs/reference/js/firestore_.persistentcacheindexmanager.md
260+
- title: PersistentCacheSettings
261+
path: /docs/reference/js/firestore_.persistentcachesettings.md
262+
- title: PersistentLocalCache
263+
path: /docs/reference/js/firestore_.persistentlocalcache.md
264+
- title: PersistentMultipleTabManager
265+
path: /docs/reference/js/firestore_.persistentmultipletabmanager.md
266+
- title: PersistentSingleTabManager
267+
path: /docs/reference/js/firestore_.persistentsingletabmanager.md
268+
- title: PersistentSingleTabManagerSettings
269+
path: /docs/reference/js/firestore_.persistentsingletabmanagersettings.md
252270
- title: Query
253271
path: /docs/reference/js/firestore_.query.md
254272
- title: QueryCompositeFilterConstraint

docs-devsite/firestore_.md

Lines changed: 18 additions & 141 deletions
Large diffs are not rendered by default.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Project: /docs/reference/js/_project.yaml
2+
Book: /docs/reference/_book.yaml
3+
page_type: reference
4+
5+
{% comment %}
6+
DO NOT EDIT THIS FILE!
7+
This is generated by the JS SDK team, and any local changes will be
8+
overwritten. Changes should be made in the source code at
9+
https://github.com/firebase/firebase-js-sdk
10+
{% endcomment %}
11+
12+
# MemoryCacheSettings interface
13+
An settings object to configure an `MemoryLocalCache` instance.
14+
15+
<b>Signature:</b>
16+
17+
```typescript
18+
export declare interface MemoryCacheSettings
19+
```
20+
21+
## Properties
22+
23+
| Property | Type | Description |
24+
| --- | --- | --- |
25+
| [garbageCollector](./firestore_.memorycachesettings.md#memorycachesettingsgarbagecollector) | [MemoryGarbageCollector](./firestore_.md#memorygarbagecollector) | The garbage collector to use, for the memory cache layer. A <code>MemoryEagerGarbageCollector</code> is used when this is undefined. |
26+
27+
## MemoryCacheSettings.garbageCollector
28+
29+
The garbage collector to use, for the memory cache layer. A `MemoryEagerGarbageCollector` is used when this is undefined.
30+
31+
<b>Signature:</b>
32+
33+
```typescript
34+
garbageCollector?: MemoryGarbageCollector;
35+
```
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Project: /docs/reference/js/_project.yaml
2+
Book: /docs/reference/_book.yaml
3+
page_type: reference
4+
5+
{% comment %}
6+
DO NOT EDIT THIS FILE!
7+
This is generated by the JS SDK team, and any local changes will be
8+
overwritten. Changes should be made in the source code at
9+
https://github.com/firebase/firebase-js-sdk
10+
{% endcomment %}
11+
12+
# MemoryEagerGarbageCollector interface
13+
A garbage collector deletes documents whenever they are not part of any active queries, and have no local mutations attached to them.
14+
15+
This collector tries to ensure lowest memory footprints from the SDK, at the risk of documents not being cached for offline queries or for direct queries to the cache.
16+
17+
Use factory function to create an instance of this collector.
18+
19+
<b>Signature:</b>
20+
21+
```typescript
22+
export declare interface MemoryEagerGarbageCollector
23+
```
24+
25+
## Properties
26+
27+
| Property | Type | Description |
28+
| --- | --- | --- |
29+
| [kind](./firestore_.memoryeagergarbagecollector.md#memoryeagergarbagecollectorkind) | 'memoryEager' | |
30+
31+
## MemoryEagerGarbageCollector.kind
32+
33+
<b>Signature:</b>
34+
35+
```typescript
36+
kind: 'memoryEager';
37+
```
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Project: /docs/reference/js/_project.yaml
2+
Book: /docs/reference/_book.yaml
3+
page_type: reference
4+
5+
{% comment %}
6+
DO NOT EDIT THIS FILE!
7+
This is generated by the JS SDK team, and any local changes will be
8+
overwritten. Changes should be made in the source code at
9+
https://github.com/firebase/firebase-js-sdk
10+
{% endcomment %}
11+
12+
# MemoryLocalCache interface
13+
Provides an in-memory cache to the SDK. This is the default cache unless explicitly configured otherwise.
14+
15+
To use, create an instance using the factory function , then set the instance to `FirestoreSettings.cache` and call `initializeFirestore` using the settings object.
16+
17+
<b>Signature:</b>
18+
19+
```typescript
20+
export declare interface MemoryLocalCache
21+
```
22+
23+
## Properties
24+
25+
| Property | Type | Description |
26+
| --- | --- | --- |
27+
| [kind](./firestore_.memorylocalcache.md#memorylocalcachekind) | 'memory' | |
28+
29+
## MemoryLocalCache.kind
30+
31+
<b>Signature:</b>
32+
33+
```typescript
34+
kind: 'memory';
35+
```
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Project: /docs/reference/js/_project.yaml
2+
Book: /docs/reference/_book.yaml
3+
page_type: reference
4+
5+
{% comment %}
6+
DO NOT EDIT THIS FILE!
7+
This is generated by the JS SDK team, and any local changes will be
8+
overwritten. Changes should be made in the source code at
9+
https://github.com/firebase/firebase-js-sdk
10+
{% endcomment %}
11+
12+
# MemoryLruGarbageCollector interface
13+
A garbage collector deletes Least-Recently-Used documents in multiple batches.
14+
15+
This collector is configured with a target size, and will only perform collection when the cached documents exceed the target size. It avoids querying backend repeated for the same query or document, at the risk of having a larger memory footprint.
16+
17+
Use factory function to create a instance of this collector.
18+
19+
<b>Signature:</b>
20+
21+
```typescript
22+
export declare interface MemoryLruGarbageCollector
23+
```
24+
25+
## Properties
26+
27+
| Property | Type | Description |
28+
| --- | --- | --- |
29+
| [kind](./firestore_.memorylrugarbagecollector.md#memorylrugarbagecollectorkind) | 'memoryLru' | |
30+
31+
## MemoryLruGarbageCollector.kind
32+
33+
<b>Signature:</b>
34+
35+
```typescript
36+
kind: 'memoryLru';
37+
```
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Project: /docs/reference/js/_project.yaml
2+
Book: /docs/reference/_book.yaml
3+
page_type: reference
4+
5+
{% comment %}
6+
DO NOT EDIT THIS FILE!
7+
This is generated by the JS SDK team, and any local changes will be
8+
overwritten. Changes should be made in the source code at
9+
https://github.com/firebase/firebase-js-sdk
10+
{% endcomment %}
11+
12+
# PersistentCacheSettings interface
13+
An settings object to configure an `PersistentLocalCache` instance.
14+
15+
Persistent cache cannot be used in a Node.js environment.
16+
17+
<b>Signature:</b>
18+
19+
```typescript
20+
export declare interface PersistentCacheSettings
21+
```
22+
23+
## Properties
24+
25+
| Property | Type | Description |
26+
| --- | --- | --- |
27+
| [cacheSizeBytes](./firestore_.persistentcachesettings.md#persistentcachesettingscachesizebytes) | number | An approximate cache size threshold for the on-disk data. If the cache grows beyond this size, Firestore will start removing data that hasn't been recently used. The SDK does not guarantee that the cache will stay below that size, only that if the cache exceeds the given size, cleanup will be attempted.<!-- -->The default value is 40 MB. The threshold must be set to at least 1 MB, and can be set to <code>CACHE_SIZE_UNLIMITED</code> to disable garbage collection. |
28+
| [tabManager](./firestore_.persistentcachesettings.md#persistentcachesettingstabmanager) | [PersistentTabManager](./firestore_.md#persistenttabmanager) | Specifies how multiple tabs/windows will be managed by the SDK. |
29+
30+
## PersistentCacheSettings.cacheSizeBytes
31+
32+
An approximate cache size threshold for the on-disk data. If the cache grows beyond this size, Firestore will start removing data that hasn't been recently used. The SDK does not guarantee that the cache will stay below that size, only that if the cache exceeds the given size, cleanup will be attempted.
33+
34+
The default value is 40 MB. The threshold must be set to at least 1 MB, and can be set to `CACHE_SIZE_UNLIMITED` to disable garbage collection.
35+
36+
<b>Signature:</b>
37+
38+
```typescript
39+
cacheSizeBytes?: number;
40+
```
41+
42+
## PersistentCacheSettings.tabManager
43+
44+
Specifies how multiple tabs/windows will be managed by the SDK.
45+
46+
<b>Signature:</b>
47+
48+
```typescript
49+
tabManager?: PersistentTabManager;
50+
```
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Project: /docs/reference/js/_project.yaml
2+
Book: /docs/reference/_book.yaml
3+
page_type: reference
4+
5+
{% comment %}
6+
DO NOT EDIT THIS FILE!
7+
This is generated by the JS SDK team, and any local changes will be
8+
overwritten. Changes should be made in the source code at
9+
https://github.com/firebase/firebase-js-sdk
10+
{% endcomment %}
11+
12+
# PersistentLocalCache interface
13+
Provides a persistent cache backed by IndexedDb to the SDK.
14+
15+
To use, create an instance using the factory function , then set the instance to `FirestoreSettings.cache` and call `initializeFirestore` using the settings object.
16+
17+
<b>Signature:</b>
18+
19+
```typescript
20+
export declare interface PersistentLocalCache
21+
```
22+
23+
## Properties
24+
25+
| Property | Type | Description |
26+
| --- | --- | --- |
27+
| [kind](./firestore_.persistentlocalcache.md#persistentlocalcachekind) | 'persistent' | |
28+
29+
## PersistentLocalCache.kind
30+
31+
<b>Signature:</b>
32+
33+
```typescript
34+
kind: 'persistent';
35+
```

0 commit comments

Comments
 (0)