mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 19:45:05 +01:00
Move interface to common.ts
This commit is contained in:
parent
2a3b13ecce
commit
9688a561b3
@ -15,6 +15,14 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import type {BlobHandle} from "../../platform/web/dom/BlobHandle.js";
|
||||||
|
|
||||||
|
export interface BlobBody {
|
||||||
|
mimeType: string;
|
||||||
|
body: BlobHandle;
|
||||||
|
length: number;
|
||||||
|
}
|
||||||
|
|
||||||
export function encodeQueryParams(queryParams) {
|
export function encodeQueryParams(queryParams) {
|
||||||
return Object.entries(queryParams || {})
|
return Object.entries(queryParams || {})
|
||||||
.filter(([, value]) => value !== undefined)
|
.filter(([, value]) => value !== undefined)
|
@ -15,14 +15,7 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import type {RequestResult} from "../web/dom/request/fetch.js";
|
import type {RequestResult} from "../web/dom/request/fetch.js";
|
||||||
import type {BlobHandle} from "../web/dom/BlobHandle.js";
|
import type {BlobBody} from "../../matrix/net/common";
|
||||||
|
|
||||||
//ts-todo: This should go somewhere else?
|
|
||||||
interface BlobBody {
|
|
||||||
mimeType: string;
|
|
||||||
body: BlobHandle;
|
|
||||||
length: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface IRequestOptions {
|
interface IRequestOptions {
|
||||||
uploadProgress?: (loadedBytes: number) => void;
|
uploadProgress?: (loadedBytes: number) => void;
|
||||||
|
Loading…
Reference in New Issue
Block a user