@atlaspack/conditional-import-types 2.13.3-dev.144 → 2.13.3-dev.146
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/index.d.ts +2 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaspack/conditional-import-types
|
|
2
2
|
|
|
3
|
+
## 2.13.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#573](https://github.com/atlassian-labs/atlaspack/pull/573) [`73cfd8c`](https://github.com/atlassian-labs/atlaspack/commit/73cfd8cf89cd02a8c64893d7342dc00b2edc5c81) Thanks [@dddlr](https://github.com/dddlr)! - Update documentation for importCond
|
|
8
|
+
|
|
3
9
|
## 2.13.3
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/index.d.ts
CHANGED
|
@@ -12,8 +12,6 @@ type ConditionalImport<
|
|
|
12
12
|
> = CondT['default'] | CondF['default'];
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* **IMPORTANT: This API is currently a no-op. Do not use until this message is removed.**
|
|
16
|
-
*
|
|
17
15
|
* Conditionally import a dependency, based on the specified condition.
|
|
18
16
|
*
|
|
19
17
|
* This is a synchronous import that differs from conditionally loading a dynamic import (`import()`)
|
|
@@ -21,8 +19,8 @@ type ConditionalImport<
|
|
|
21
19
|
* This function requires server to guarantee the dependency is loaded.
|
|
22
20
|
*
|
|
23
21
|
* @param condition Condition evaluated by the server
|
|
24
|
-
* @param ifTrueDependency Dependency returned if the condition is true
|
|
25
|
-
* @param ifFalseDependency Dependency returned if the condition is false
|
|
22
|
+
* @param ifTrueDependency Dependency returned if the condition is true. This should be a relative file path like './ui/comment-component-new.tsx'
|
|
23
|
+
* @param ifFalseDependency Dependency returned if the condition is false. This should be a relative file path like './ui/comment-component-old.tsx'
|
|
26
24
|
*/
|
|
27
25
|
declare function importCond<CondT, CondF>(
|
|
28
26
|
condition: string,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/conditional-import-types",
|
|
3
|
-
"version": "2.13.3-dev.
|
|
3
|
+
"version": "2.13.3-dev.146+33cba81e9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"repository": {
|
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
13
13
|
"type": "commonjs",
|
|
14
|
-
"gitHead": "
|
|
14
|
+
"gitHead": "33cba81e98b6eb098014f5a19d7932821b95f075"
|
|
15
15
|
}
|