Skip to content

Remove Closure types #4435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
388 changes: 193 additions & 195 deletions common/api-review/database.api.md
Original file line number Diff line number Diff line change
@@ -1,195 +1,193 @@
## API Report File for "@firebase/database"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts

import { FirebaseApp } from '@firebase/app-types';

// @public (undocumented)
export interface Database {
// (undocumented)
app: FirebaseApp;
// (undocumented)
goOffline(): void;
// (undocumented)
goOnline(): void;
// (undocumented)
ref(path?: string | Reference): Reference;
// (undocumented)
refFromURL(url: string): Reference;
// (undocumented)
useEmulator(host: string, port: number): void;
}

// @public (undocumented)
export interface DataSnapshot {
// (undocumented)
child(path: string): DataSnapshot;
// (undocumented)
exists(): boolean;
// (undocumented)
exportVal(): any;
// (undocumented)
forEach(action: (a: DataSnapshot) => boolean | void): boolean;
// (undocumented)
getPriority(): string | number | null;
// (undocumented)
hasChild(path: string): boolean;
// (undocumented)
hasChildren(): boolean;
// (undocumented)
key: string | null;
// (undocumented)
numChildren(): number;
// (undocumented)
ref: Reference;
// (undocumented)
toJSON(): object | null;
// (undocumented)
val(): any;
}

// @public (undocumented)
export function enableLogging(
logger?: boolean | ((a: string) => any),
persistent?: boolean
): any;

// @public (undocumented)
export type EventType =
| 'value'
| 'child_added'
| 'child_changed'
| 'child_moved'
| 'child_removed';

// @public (undocumented)
export function getDatabase(app: FirebaseApp, url?: string): Database;

// @public (undocumented)
export interface OnDisconnect {
// (undocumented)
cancel(onComplete?: (a: Error | null) => any): Promise<void>;
// (undocumented)
remove(onComplete?: (a: Error | null) => any): Promise<void>;
// (undocumented)
set(value: any, onComplete?: (a: Error | null) => any): Promise<void>;
// (undocumented)
setWithPriority(
value: any,
priority: number | string | null,
onComplete?: (a: Error | null) => any
): Promise<any>;
// (undocumented)
update(values: object, onComplete?: (a: Error | null) => any): Promise<any>;
}

// @public (undocumented)
export interface Query {
// (undocumented)
endAt(value: number | string | boolean | null, key?: string): Query;
// (undocumented)
equalTo(value: number | string | boolean | null, key?: string): Query;
// (undocumented)
get(): Promise<DataSnapshot>;
// (undocumented)
isEqual(other: Query | null): boolean;
// (undocumented)
limitToFirst(limit: number): Query;
// (undocumented)
limitToLast(limit: number): Query;
// (undocumented)
off(
eventType?: EventType,
callback?: (a: DataSnapshot, b?: string | null) => any,
context?: object | null
): void;
// (undocumented)
on(
eventType: EventType,
callback: (a: DataSnapshot, b?: string | null) => any,
cancelCallbackOrContext?: ((a: Error) => any) | object | null,
context?: object | null
): (a: DataSnapshot, b?: string | null) => any;
// (undocumented)
once(
eventType: EventType,
successCallback?: (a: DataSnapshot, b?: string | null) => any,
failureCallbackOrContext?: ((a: Error) => void) | object | null,
context?: object | null
): Promise<DataSnapshot>;
// (undocumented)
orderByChild(path: string): Query;
// (undocumented)
orderByKey(): Query;
// (undocumented)
orderByPriority(): Query;
// (undocumented)
orderByValue(): Query;
// (undocumented)
ref: Reference;
// (undocumented)
startAt(value: number | string | boolean | null, key?: string): Query;
// (undocumented)
toJSON(): object;
// (undocumented)
toString(): string;
}

// @public (undocumented)
export interface Reference extends Query {
// (undocumented)
child(path: string): Reference;
// (undocumented)
key: string | null;
// (undocumented)
onDisconnect(): OnDisconnect;
// (undocumented)
parent: Reference | null;
// (undocumented)
push(value?: any, onComplete?: (a: Error | null) => any): ThenableReference;
// (undocumented)
remove(onComplete?: (a: Error | null) => any): Promise<any>;
// (undocumented)
root: Reference;
// (undocumented)
set(value: any, onComplete?: (a: Error | null) => any): Promise<any>;
// (undocumented)
setPriority(
priority: string | number | null,
onComplete: (a: Error | null) => any
): Promise<any>;
// (undocumented)
setWithPriority(
newVal: any,
newPriority: string | number | null,
onComplete?: (a: Error | null) => any
): Promise<any>;
// (undocumented)
transaction(
transactionUpdate: (a: any) => any,
onComplete?: (a: Error | null, b: boolean, c: DataSnapshot | null) => any,
applyLocally?: boolean
): Promise<any>;
// (undocumented)
update(values: object, onComplete?: (a: Error | null) => any): Promise<any>;
}

// @public (undocumented)
export interface ServerValue {
// (undocumented)
increment(delta: number): object;
// (undocumented)
TIMESTAMP: object;
}

// @public (undocumented)
export interface ThenableReference
extends Reference,
Pick<Promise<Reference>, 'then' | 'catch'> {}


// (No @packageDocumentation comment for this package)

```
## API Report File for "@firebase/database"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts

import { FirebaseApp } from '@firebase/app-types';

// @public (undocumented)
export interface Database {
// (undocumented)
app: FirebaseApp;
// (undocumented)
goOffline(): void;
// (undocumented)
goOnline(): void;
// (undocumented)
ref(path?: string | Reference): Reference;
// (undocumented)
refFromURL(url: string): Reference;
// (undocumented)
useEmulator(host: string, port: number): void;
}

// @public (undocumented)
export interface DataSnapshot {
// (undocumented)
child(path: string): DataSnapshot;
// (undocumented)
exists(): boolean;
// (undocumented)
exportVal(): any;
// (undocumented)
forEach(action: (a: DataSnapshot) => boolean | void): boolean;
// (undocumented)
getPriority(): string | number | null;
// (undocumented)
hasChild(path: string): boolean;
// (undocumented)
hasChildren(): boolean;
// (undocumented)
key: string | null;
// (undocumented)
numChildren(): number;
// (undocumented)
ref: Reference;
// (undocumented)
toJSON(): object | null;
// (undocumented)
val(): any;
}

// @public (undocumented)
export function enableLogging(
logger?: boolean | ((a: string) => any),
persistent?: boolean
): any;

// @public (undocumented)
export type EventType =
| 'value'
| 'child_added'
| 'child_changed'
| 'child_moved'
| 'child_removed';

// @public (undocumented)
export function getDatabase(app: FirebaseApp, url?: string): Database;

// @public (undocumented)
export interface OnDisconnect {
// (undocumented)
cancel(onComplete?: (a: Error | null) => any): Promise<void>;
// (undocumented)
remove(onComplete?: (a: Error | null) => any): Promise<void>;
// (undocumented)
set(value: any, onComplete?: (a: Error | null) => any): Promise<void>;
// (undocumented)
setWithPriority(
value: any,
priority: number | string | null,
onComplete?: (a: Error | null) => any
): Promise<any>;
// (undocumented)
update(values: object, onComplete?: (a: Error | null) => any): Promise<any>;
}

// @public (undocumented)
export interface Query {
// (undocumented)
endAt(value: number | string | boolean | null, key?: string): Query;
// (undocumented)
equalTo(value: number | string | boolean | null, key?: string): Query;
// (undocumented)
get(): Promise<DataSnapshot>;
// (undocumented)
isEqual(other: Query | null): boolean;
// (undocumented)
limitToFirst(limit: number): Query;
// (undocumented)
limitToLast(limit: number): Query;
// (undocumented)
off(
eventType?: EventType,
callback?: (a: DataSnapshot, b?: string | null) => any,
context?: object | null
): void;
// (undocumented)
on(
eventType: EventType,
callback: (a: DataSnapshot, b?: string | null) => any,
cancelCallbackOrContext?: ((a: Error) => any) | object | null,
context?: object | null
): (a: DataSnapshot, b?: string | null) => any;
// (undocumented)
once(
eventType: EventType,
successCallback?: (a: DataSnapshot, b?: string | null) => any,
failureCallbackOrContext?: ((a: Error) => void) | object | null,
context?: object | null
): Promise<DataSnapshot>;
// (undocumented)
orderByChild(path: string): Query;
// (undocumented)
orderByKey(): Query;
// (undocumented)
orderByPriority(): Query;
// (undocumented)
orderByValue(): Query;
// (undocumented)
ref: Reference;
// (undocumented)
startAt(value: number | string | boolean | null, key?: string): Query;
// (undocumented)
toJSON(): object;
// (undocumented)
toString(): string;
}

// @public (undocumented)
export interface Reference extends Query {
// (undocumented)
child(path: string): Reference;
// (undocumented)
key: string | null;
// (undocumented)
onDisconnect(): OnDisconnect;
// (undocumented)
parent: Reference | null;
// (undocumented)
push(value?: any, onComplete?: (a: Error | null) => any): ThenableReference;
// (undocumented)
remove(onComplete?: (a: Error | null) => any): Promise<any>;
// (undocumented)
root: Reference;
// (undocumented)
set(value: any, onComplete?: (a: Error | null) => any): Promise<any>;
// (undocumented)
setPriority(
priority: string | number | null,
onComplete: (a: Error | null) => any
): Promise<any>;
// (undocumented)
setWithPriority(
newVal: any,
newPriority: string | number | null,
onComplete?: (a: Error | null) => any
): Promise<any>;
// (undocumented)
transaction(
transactionUpdate: (a: any) => any,
onComplete?: (a: Error | null, b: boolean, c: DataSnapshot | null) => any,
applyLocally?: boolean
): Promise<any>;
// (undocumented)
update(values: object, onComplete?: (a: Error | null) => any): Promise<any>;
}

// @public (undocumented)
export const ServerValue: {
TIMESTAMP: object;
increment(delta: number): object;
};

// @public (undocumented)
export interface ThenableReference
extends Reference,
Pick<Promise<Reference>, 'then' | 'catch'> {}


// (No @packageDocumentation comment for this package)

```
1 change: 1 addition & 0 deletions packages/database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"scripts": {
"lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
"prettier": "prettier --write '*.js' '*.ts' '@(exp|src|test)/**/*.ts'",
"build": "run-p build:classic build:exp && yarn api-report",
"build:classic": "rollup -c rollup.config.js",
"build:exp": "rollup -c rollup.config.exp.js && yarn api-report",
Expand Down
Loading