Skip to content

Commit a94595b

Browse files
committed
Added defer feature.
1 parent 8da87c7 commit a94595b

File tree

207 files changed

+657
-330
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

207 files changed

+657
-330
lines changed

runtime/src/utilities.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ export class lazyComponent extends Component {
8989
}
9090
}
9191

92-
export const lazy = (path) => async () => {
92+
export const lazy = (path) => async () => load(path)
93+
94+
export const load = async (path) => {
9395
const x = await import(path)
9496
return x.default
9597
}

spec/compilers2/access

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ component Main {
88
}
99
}
1010
--------------------------------------------------------------------------------
11-
const A = () => {
11+
export const A = () => {
1212
return {
1313
name: `test`
1414
}.name

spec/compilers2/access_deep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ component Main {
2222
--------------------------------------------------------------------------------
2323
import { signal as A } from "runtime";
2424

25-
const
25+
export const
2626
a = A({
2727
level1: {
2828
level2: {

spec/compilers2/argument

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ component Main {
1010
}
1111
}
1212
--------------------------------------------------------------------------------
13-
const A = () => {
13+
export const A = () => {
1414
const a = (b, c) => {
1515
return c
1616
};

spec/compilers2/argument_with_default

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ component Main {
1010
}
1111
}
1212
--------------------------------------------------------------------------------
13-
const A = () => {
13+
export const A = () => {
1414
const a = (b, c = 0) => {
1515
return c
1616
};

spec/compilers2/argument_with_default_inline_function

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ component Main {
1111
}
1212
}
1313
--------------------------------------------------------------------------------
14-
const A = () => {
14+
export const A = () => {
1515
const a = (b, c = 0) => {
1616
return c
1717
};

spec/compilers2/array_access

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
variant as B
2323
} from "runtime";
2424

25-
const
25+
export const
2626
A = B(0),
2727
C = B(1),
2828
D = () => {

spec/compilers2/array_literal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ component Main {
1010
}
1111
}
1212
--------------------------------------------------------------------------------
13-
const A = () => {
13+
export const A = () => {
1414
[
1515
`Hello`,
1616
`Blah`,

spec/compilers2/block

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ component Main {
66
}
77
}
88
--------------------------------------------------------------------------------
9-
const A = () => {
9+
export const A = () => {
1010
const a = `Some string...`;
1111
return a + `, other string...`
1212
};

spec/compilers2/block_with_await

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ component Main {
1414
}
1515
}
1616
--------------------------------------------------------------------------------
17-
const A = () => {
17+
export const A = () => {
1818
const
1919
a = () => {
2020
return undefined

0 commit comments

Comments
 (0)