1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-06-17 13:56:01 +00:00
This commit is contained in:
MatteZ02
2020-03-03 22:30:50 +02:00
parent edfcc6f474
commit 30022c7634
11800 changed files with 1984416 additions and 1 deletions

View File

@ -0,0 +1,17 @@
/**
* @license
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export {};

View File

@ -0,0 +1 @@
export {};

View File

@ -0,0 +1 @@
export {};

View File

@ -0,0 +1 @@
export {};

View File

@ -0,0 +1 @@
export {};

View File

@ -0,0 +1 @@
export {};

View File

@ -0,0 +1 @@
export {};

View File

@ -0,0 +1,31 @@
import { FirebaseApp } from '@firebase/app-types';
import { Code, FirebaseStorageError } from '../src/implementation/error';
import { Headers, XhrIo } from '../src/implementation/xhrio';
import { XhrIoPool } from '../src/implementation/xhriopool';
import { SendHook } from './xhrio';
import { FirebaseAuthInternal } from '@firebase/auth-interop-types';
import { Provider } from '@firebase/component';
export declare const authToken = "totally-legit-auth-token";
export declare const bucket = "mybucket";
export declare const fakeApp: FirebaseApp;
export declare const fakeAuthProvider: Provider<FirebaseAuthInternal>;
export declare const emptyAuthProvider: any;
export declare function makeFakeApp(bucketArg?: string): FirebaseApp;
export declare function makeFakeAuthProvider(token: {} | null): Provider<FirebaseAuthInternal>;
export declare function makePool(sendHook: SendHook | null): XhrIoPool;
/**
* Returns something that looks like an fbs.XhrIo with the given headers
* and status.
*/
export declare function fakeXhrIo(headers: Headers, status?: number): XhrIo;
/**
* Binds ignoring types. Used to test calls involving improper arguments.
*/
export declare function bind(f: Function, ctx: any, ...args: any[]): () => void;
export declare function assertThrows(f: () => void, code: Code): FirebaseStorageError;
export declare function assertUint8ArrayEquals(arr1: Uint8Array, arr2: Uint8Array): void;
export declare function assertObjectIncludes(included: {
[name: string]: any;
}, obj: {
[name: string]: any;
}): void;

32
node_modules/@firebase/storage/dist/test/xhrio.d.ts generated vendored Normal file
View File

@ -0,0 +1,32 @@
import { ErrorCode, Headers, XhrIo } from '../src/implementation/xhrio';
export declare type SendHook = (xhrio: TestingXhrIo, url: string, method: string, body?: ArrayBufferView | Blob | string | null, headers?: Headers) => void;
export declare enum State {
START = 0,
SENT = 1,
DONE = 2
}
export interface StringHeaders {
[name: string]: string;
}
export declare class TestingXhrIo implements XhrIo {
private state;
private sendPromise;
private resolve;
private sendHook;
private status;
private responseText;
private headers;
private errorCode;
constructor(sendHook: SendHook | null);
send(url: string, method: string, body?: ArrayBufferView | Blob | string | null, headers?: Headers): Promise<XhrIo>;
simulateResponse(status: number, body: string, headers: {
[key: string]: string;
}): void;
getErrorCode(): ErrorCode;
getStatus(): number;
getResponseText(): string;
abort(): void;
getResponseHeader(header: string): string | null;
addUploadProgressListener(): void;
removeUploadProgressListener(): void;
}