ohpm install 之后的使用
ohpm install protobuf 这个库之后,我看里面有base64的子模块,但是不知道如何导入使用,请教一下如何使用,其中的index.d.ts文件内容如下:
/**
* Calculates the byte length of a base64 encoded string.
* @param {string} string Base64 encoded string
* @returns {number} Byte length
*/
export function length(string: string): number;
/**
* Encodes a buffer to a base64 encoded string.
* @param {Uint8Array} buffer Source buffer
* @param {number} start Source start
* @param {number} end Source end
* @returns {string} Base64 encoded string
*/
export function encode(buffer: Uint8Array, start: number, end: number): string;
/**
* Decodes a base64 encoded string to a buffer.
* @param {string} string Source string
* @param {Uint8Array} buffer Destination buffer
* @param {number} offset Destination offset
* @returns {number} Number of bytes written
* @throws {Error} If encoding is invalid
*/
export function decode(string: string, buffer: Uint8Array, offset: number): number;
/**
* Tests if the specified string appears to be base64 encoded.
* @param {string} string String to test
* @returns {boolean} `true` if it appears to be base64 encoded, otherwise false
*/
export function test(string: string): boolean;
HarmonyOS
赞
收藏 0
回答 1
待解决
相关问题
HarmonyOS ohpm install命令使用tag安装时无法识别
1024浏览 • 1回复 待解决
ohpm config set registry 设置了源之后 如何恢复ohpm自己本来的源啊
3593浏览 • 1回复 待解决
HarmonyOS hvigor插件里面怎么调用ohpm install命令
1212浏览 • 1回复 待解决
通过ohpm install 第三方npm包,报错
3086浏览 • 1回复 待解决
使用ohpm发布tgz文件时报错
1965浏览 • 1回复 待解决
HarmonyOS 开发的模块(SDK)放到私有仓库,然后通过ohpm install 去拉取依赖,ohpm install内部逻辑应该是读取远程仓库里模块的描述文件我想知道模块的描述文件有没有官方的格式介绍
902浏览 • 1回复 待解决
如何使用ohpm引入三四方库
4395浏览 • 3回复 待解决
除了devstudio下载的时候自带的ohpm,ohpm能单独安装吗?
722浏览 • 1回复 待解决
应用IDE升级到Canary2之后,版本号报错ohpm ERROR : Found exception: Error
1574浏览 • 1回复 待解决
使用position之后height不生效
3517浏览 • 1回复 待解决
使用安装命令报错install invalid hap size
8637浏览 • 1回复 待解决
ohpm not set up有了解的吗?
3747浏览 • 2回复 待解决
HarmonyOS 私有ohpm库,上传包成功但是ohpm i 时报错
2140浏览 • 1回复 待解决
HarmonyOS 使用企业证书的hap包是否可以使用hdc install命令直接安装
2852浏览 • 1回复 待解决
ohpm publish 推送har包大小的限制
1649浏览 • 1回复 待解决
ohpm的har包文件存储集群化
1205浏览 • 1回复 待解决
ohpm下架发布产物后,重新产物不能使用先前的版本号
1229浏览 • 1回复 待解决
HarmonyOS react-native工程使用yarn install报错
1120浏览 • 1回复 待解决
mac系统,ohpm下载内容的缓存地址
2185浏览 • 1回复 待解决
参数不识别(ohpm run)
1520浏览 • 1回复 待解决
HarmonyOS ohpm 无clear命令
1155浏览 • 1回复 待解决
ohpm unpublish 对于带group的不成功
1784浏览 • 1回复 待解决
ohpm私仓找不到中心仓库的库
1529浏览 • 1回复 待解决
#鸿蒙学习大百科#如何使用ohpm安装三方库?
1117浏览 • 1回复 待解决
搭建ohpm私仓服务疑问?
2086浏览 • 1回复 待解决
此方法属于三方库 protobufjs中定义的方法,在三方库里使用的,如果在HarmonyOS中使用base64,可以参考: https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-util-V5#base64helper9。