Skip to content

Commit

Permalink
fix: verbatimModuleSyntax:true
Browse files Browse the repository at this point in the history
  • Loading branch information
missannil committed Dec 22, 2023
1 parent 520de23 commit 486cf8d
Show file tree
Hide file tree
Showing 23 changed files with 34 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
version: ${{ steps.release.outputs.version }}
steps:
# 使用哪个action
- uses: google-github-actions/release-please-action@v3
- uses: google-github-actions/release-please-action@v4
# action id 便于其他流访问
id: release
with:
Expand Down
2 changes: 1 addition & 1 deletion src/api/DefineComponent/collectOptionsForComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { BBeforeCreate } from "../../behaviors/BbeforeCreated";
import { BComputedAndWatch } from "../../behaviors/BComputedAndWatch";
import type { ComputedCache, Instance } from "../../behaviors/BComputedAndWatch/types";
import { BStore } from "../../behaviors/BStore";
import { Assign } from "../../types/Assign";
import type { Assign } from "../../types/Assign";
import type { WMComponent } from "../../types/OfficialTypeAlias";
import { INNERMARKER } from "../../utils/InnerMarker";
import { isEmptyObject } from "../../utils/isEmptyObject";
Expand Down
10 changes: 5 additions & 5 deletions src/api/InstanceInject/instanceConfig.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* eslint-disable @typescript-eslint/explicit-member-accessibility */

import { ReturnTypeInObject } from "hry-types/src/Object/ReturnTypeInObject";
import { WMComponentOption } from "../../types/OfficialTypeAlias";
import { DataConstraint } from "../RootComponent/Data/DataConstraint";
import { MethodsConstraint } from "../RootComponent/Methods/MethodsConstraint";
import { StoreConstraint } from "../RootComponent/Store/StoreConstraint";
import type { ReturnTypeInObject } from "hry-types/src/Object/ReturnTypeInObject";
import type { WMComponentOption } from "../../types/OfficialTypeAlias";
import type { DataConstraint } from "../RootComponent/Data/DataConstraint";
import type { MethodsConstraint } from "../RootComponent/Methods/MethodsConstraint";
import type { StoreConstraint } from "../RootComponent/Store/StoreConstraint";

// 利用继承的多态性 使得IInjectInfo类型可由使用者外部定义
interface BaseInjectInfo {
Expand Down
2 changes: 1 addition & 1 deletion src/api/InstanceInject/test/normal.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Checking, Test } from "hry-types";
import { Checking, type Test } from "hry-types";
import { RootComponent } from "../../RootComponent";

// 1. 注入字段无重复时
Expand Down
2 changes: 1 addition & 1 deletion src/api/RootComponent/Computed/test/normal.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Checking, type Test } from "hry-types";
import type { ReadonlyDeep } from "hry-types/src/Any/_api";
import { IInjectData } from "../../../InstanceInject/instanceConfig";
import type { IInjectData } from "../../../InstanceInject/instanceConfig";
import { RootComponent } from "../..";
import type { Mock_User } from "../../Properties/test/normalRequired.test";

Expand Down
2 changes: 1 addition & 1 deletion src/api/RootComponent/Data/test/normal.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Checking, type Test } from "hry-types";

import type { ReadonlyDeep } from "hry-types/src/Any/_api";
import { IInjectData } from "../../../InstanceInject/instanceConfig";
import type { IInjectData } from "../../../InstanceInject/instanceConfig";
import { RootComponent } from "../..";

type Gender = "male" | "female";
Expand Down
4 changes: 2 additions & 2 deletions src/api/RootComponent/Instance/RootComponentInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import type { IfExtends } from "hry-types/src/Any/IfExtends";
import type { ComputeIntersection } from "hry-types/src/Object/ComputeIntersection";
import type { IReactionDisposer } from "mobx";

import { Assign } from "../../../types/Assign";
import type { Assign } from "../../../types/Assign";
import type { WMComponentInstance, WMInstanceMethods, WMPageInstance } from "../../../types/OfficialTypeAlias";
import { IInjectData, IInjectMethods } from "../../InstanceInject/instanceConfig";
import type { IInjectData, IInjectMethods } from "../../InstanceInject/instanceConfig";
import type { CustomEventMethods } from "./CustomEventMethods";
import type { CustomSetData } from "./CustomSetData";
export type RootComponentInstance<
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Checking, type Test } from "hry-types";
import type { ReadonlyDeep } from "hry-types/src/Any/ReadonlyDeep";
import { type DetailedType, RootComponent } from "../../../../..";
import { IInjectData } from "../../../../InstanceInject/instanceConfig";
import type { IInjectData } from "../../../../InstanceInject/instanceConfig";

// 组件时
RootComponent()({
Expand Down
2 changes: 1 addition & 1 deletion src/api/RootComponent/Lifetimes/test/normal.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Checking, Test } from "hry-types";
import { Checking, type Test } from "hry-types";
import { RootComponent } from "../../../..";

/**
Expand Down
7 changes: 4 additions & 3 deletions src/api/RootComponent/Observers/test/normal.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Checking, Test } from "hry-types";
import { ReadonlyDeep } from "hry-types/src/Any/_api";
import { User } from "../../../../../jest/common";
import { Checking, type Test } from "hry-types";
import type { ReadonlyDeep } from "hry-types/src/Any/_api";

import type { User } from "../../../../../jest/common";
import { RootComponent } from "../..";

RootComponent()({
Expand Down
4 changes: 2 additions & 2 deletions src/api/RootComponent/Properties/test/normalEmpty.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Checking, type Test } from "hry-types";
import { ReadonlyDeep } from "hry-types/src/Any/_api";
import { IInjectData } from "../../../InstanceInject/instanceConfig";
import type { ReadonlyDeep } from "hry-types/src/Any/_api";
import type { IInjectData } from "../../../InstanceInject/instanceConfig";
import { RootComponent } from "../..";

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Checking, type Test } from "hry-types";
import type { ReadonlyDeep } from "hry-types/src/Any/_api";
import type { DetailedType } from "../../../../types/DetailedType";
import { IInjectData } from "../../../InstanceInject/instanceConfig";
import type { IInjectData } from "../../../InstanceInject/instanceConfig";
import { RootComponent } from "../..";
import { type Mock_User } from "./normalRequired.test";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Checking, type Test } from "hry-types";
import type { DetailedType } from "../../../../types/DetailedType";

import type { ReadonlyDeep } from "hry-types/src/Any/_api";
import { IInjectData } from "../../../InstanceInject/instanceConfig";
import type { IInjectData } from "../../../InstanceInject/instanceConfig";
import { RootComponent } from "../..";
import type { RequiredSingle, RequiredType, RequiredUnion } from "../PropertiesConstraint";

Expand Down
2 changes: 1 addition & 1 deletion src/api/RootComponent/Watch/test/WtachInject.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Checking, Test } from "hry-types";
import { Checking, type Test } from "hry-types";
import { RootComponent } from "../..";

/**
Expand Down
4 changes: 2 additions & 2 deletions src/api/RootComponent/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { ComputeIntersection } from "hry-types/src/Object/_api";
import type { ComputeObject } from "../../types/ComputeObj";
import type { WMCompOtherOption } from "../../types/OfficialTypeAlias";
import type { ComponentDoc } from "../DefineComponent/ReturnType/ComponentDoc";
import { IInjectStore } from "../InstanceInject/instanceConfig";
import type { IInjectStore } from "../InstanceInject/instanceConfig";
import type { ComputedConstraint } from "./Computed/ComputedConstraint";
import type { ComputedOption } from "./Computed/ComputedOption";
import type { GetComputedDoc } from "./Computed/GetComputedDoc";
Expand All @@ -22,7 +22,7 @@ import type { LifetimesConstraint } from "./Lifetimes/LifetimesConstraint";
import type { LifetimesOption } from "./Lifetimes/LifetimesOption";
import type { MethodsConstraint } from "./Methods/MethodsConstraint";
import type { MethodsOption } from "./Methods/MethodsOption";
import { ObserversOption } from "./Observers/ObserversOption";
import type { ObserversOption } from "./Observers/ObserversOption";
import type { PageLifetimesOption } from "./PageLifetimes/PageLifetimesOption";
import type { GetPropertiesDoc } from "./Properties/GetPropertiesDoc";
import type { PropertiesConstraint } from "./Properties/PropertiesConstraint";
Expand Down
2 changes: 1 addition & 1 deletion src/api/SubComponent/SubComputed/test/normal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Checking, type Test } from "hry-types";
import type { ReadonlyDeep } from "hry-types/src/Any/_api";
import type { ComponentDoc } from "../../../DefineComponent/ReturnType/ComponentDoc";

import { IInjectData } from "../../../InstanceInject/instanceConfig";
import type { IInjectData } from "../../../InstanceInject/instanceConfig";
import type { Mock_User } from "../../../RootComponent/Properties/test/normalRequired.test";
import { SubComponent } from "../..";

Expand Down
2 changes: 1 addition & 1 deletion src/api/SubComponent/SubData/test/normal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Checking, type Test } from "hry-types";
import type { ReadonlyDeep } from "hry-types/src/Any/_api";
import type { ComponentDoc } from "../../../DefineComponent/ReturnType/ComponentDoc";

import { IInjectData } from "../../../InstanceInject/instanceConfig";
import type { IInjectData } from "../../../InstanceInject/instanceConfig";
import type { Mock_User } from "../../../RootComponent/Properties/test/normalRequired.test";
import { SubComponent } from "../..";

Expand Down
2 changes: 1 addition & 1 deletion src/api/SubComponent/SubInstance/test/normal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Checking, type Test } from "hry-types";
import type { ReadonlyDeep } from "hry-types/src/Any/_api";
import type { ComponentDoc } from "../../../DefineComponent/ReturnType/ComponentDoc";

import { IInjectData } from "../../../InstanceInject/instanceConfig";
import type { IInjectData } from "../../../InstanceInject/instanceConfig";
import type { Mock_User } from "../../../RootComponent/Properties/test/normalRequired.test";
import type { RootComponentDoc } from "../../../RootComponent/RootComponentDoc";
import { SubComponent } from "../..";
Expand Down
2 changes: 1 addition & 1 deletion src/api/SubComponent/SubObservers/SubObserversOption.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { ObserversOption } from "../../RootComponent/Observers/ObserversOption";
import type { ObserversOption } from "../../RootComponent/Observers/ObserversOption";

export type SubObserversOption<TObserversData extends object> = ObserversOption<TObserversData>;
2 changes: 1 addition & 1 deletion src/api/SubComponent/SubWatch/test/WtachInject.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Checking, Test } from "hry-types";
import { Checking, type Test } from "hry-types";
import { SubComponent } from "../..";

/**
Expand Down
4 changes: 2 additions & 2 deletions src/api/SubComponent/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { ComponentDoc } from "../DefineComponent/ReturnType/ComponentDoc";

import type { Func } from "hry-types/src/Misc/Func";
import type { WMCompOtherOption } from "../../types/OfficialTypeAlias";
import { IInjectStore } from "../InstanceInject/instanceConfig";
import type { IInjectStore } from "../InstanceInject/instanceConfig";
import type { ComputedConstraint } from "../RootComponent/Computed/ComputedConstraint";
import type { DataConstraint } from "../RootComponent/Data/DataConstraint";
import type { EventsConstraint } from "../RootComponent/Events/EventsConstraint";
Expand All @@ -29,7 +29,7 @@ import type { SubInstance } from "./SubInstance/SubInstance";
import type { SubLifetimesOption } from "./SubLifetimes/SubLifetimesOption";
import type { SubMethodsConstraint } from "./SubMethods/SubMethodsConstraint";
import type { SubMethodsOption } from "./SubMethods/SubMethodsOption";
import { SubObserversOption } from "./SubObservers/SubObserversOption";
import type { SubObserversOption } from "./SubObservers/SubObserversOption";
import type { SubPageLifetimesOption } from "./SubPageLifetimes/SubPageLifetimesOption";
import type { CreateSubComponentDoc } from "./SubReturnType/CreateSubComponentDoc";
import type { SubStoreConstraint } from "./SubStore/SubDataConstraint";
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"sourceMap": true,
"declaration": true
},
"include": ["./src"]
"include": ["./src/index.ts"]
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// "noUnusedParameters": false, // 报告函数中未使用参数的错误
// "suppressImplicitAnyIndexErrors": true, // 为true关闭隐式索引错误,但很激进,建议使用@ts-ignore
"isolatedModules": true, // 模块化(.ts文件必须有导入或导出) 默认false
// "verbatimModuleSyntax": true,不能开启.jset会报错,在vscode中设置代替它要求ts版本>5.3
"verbatimModuleSyntax": true, // 强制导入类型前缀type检测,在vscode中设置"typescript.preferences.preferTypeOnlyAutoImports":true
// 默认加载所有@types下的包 types指定具体的包,其他拒绝。包含上级目录
"types": ["hry-types", "mobx", "jest", "miniprogram-api-typings"]
},
Expand Down

0 comments on commit 486cf8d

Please sign in to comment.