/
MonchenkoID
/
random
Обзор
Документация
Войти
/
MonchenkoID
/
random
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
polyfill/File.js
27 строк
639 B
KittenWithHerbs
My proposed 0.10.9 changes (#489)
31 авг 2017, 18:49
31 авг 2017, 18:49
7fa5761
Код
Авторство
О чём код?
// Copyright 2016 wkh237@github. All rights reserved. // Use of this source code is governed by a MIT-style license that can be // found in the LICENSE file. import Blob from './Blob.js' export default class File extends Blob { name : string = ''; static build(name:string, data:any, cType:string):Promise<File> { return new Promise((resolve, reject) => { if (data === undefined) { reject(new TypeError('data is undefined')) } new File(data, cType).onCreated((f) => { f.name = name resolve(f) }) }) } constructor(data:any , cType:string) { super(data, cType) } }