Skip to content

Commit 2d876cf

Browse files
committed
feat: 添加local-file接口
1 parent aaadb40 commit 2d876cf

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oflow-interface",
3-
"version": "0.9.3",
3+
"version": "0.9.4",
44
"description": "Interface package for O FLOW. You can use this package to build your own plugin that can control anything.",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/api/service/main/file/local/local-file-service-api.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {LocalFileServiceSubscriber} from "./dto/local-file-service-subscriber.type";
1+
import {LocalFileServiceEventType, LocalFileServiceSubscriber} from "./dto/local-file-service-subscriber.type";
22
import {LocalFile} from "./dto/local-file.type";
33

44
export default interface LocalFileServiceApi {
@@ -32,6 +32,11 @@ export default interface LocalFileServiceApi {
3232

3333
unsubscribeSingle(fid: string, subscriber: LocalFileServiceSubscriber): void
3434

35+
publish(fid: string, type: LocalFileServiceEventType, localFile?: LocalFile): void
36+
37+
afterLoaded(fid: string, subscriber: (localFile: LocalFile) => void): void
38+
39+
waitLoaded(fid: string): Promise<LocalFile>
3540

3641
/**
3742
* 是否已经载入完成

0 commit comments

Comments
 (0)