Skip to content

Commit

Permalink
Merge pull request #1291 from demergent-labs/robust_imports_functiona…
Browse files Browse the repository at this point in the history
…l_syntax

Updated robust imports example to functional runtime syntax
  • Loading branch information
lastmjs authored Sep 27, 2023
2 parents b655894 + 4ea2f00 commit bff5195
Show file tree
Hide file tree
Showing 13 changed files with 836 additions and 821 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# "examples/func_types",
# "examples/generics",
# "examples/motoko_examples/superheroes", # blocked by recursive
# "examples/robust_imports",
# "examples/run_time_errors",
# "examples/tuple_types",

Expand Down Expand Up @@ -83,8 +82,8 @@ jobs:
"examples/guard_functions",
"examples/heartbeat",
"examples/ic_api",
"examples/init",
"examples/imports",
"examples/init",
"examples/inspect_message",
"examples/key_value_store",
"examples/ledger_canister",
Expand Down Expand Up @@ -115,6 +114,7 @@ jobs:
"examples/query",
"examples/randomness",
"examples/rejections",
"examples/robust_imports",
"examples/service",
"examples/simple_erc20",
"examples/simple_user_accounts",
Expand Down
6 changes: 3 additions & 3 deletions examples/robust_imports/dfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"root": "src",
"ts": "src/index.ts",
"candid": "src/index.did",
"wasm": ".azle/robust_imports/robust_imports.wasm.gz",
"wasm": ".azle/robust_imports/robust_imports.wasm",
"gzip": true,
"declarations": {
"output": "dfx_generated/robust_imports",
"node_compatibility": true
},
"opt_level": "1"
}
}
}
}
35 changes: 14 additions & 21 deletions examples/robust_imports/src/azle_coverage/fruit.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import { $query as $kiwi, Alias } from 'azle';
export default $kiwi;
import { query as kiwi } from 'azle';
export default kiwi;

export {
Alias as Apple,
bool as blackberry,
blob as banana,
CallResult as Cherry,
empty as elderberry,
float32 as fig32,
float64 as fig64,
Func as Farkleberry,
GuardResult as Grapes,
$heartbeat as $honeydew,
$init as $icaco,
$inspectMessage as $ilama,
heartbeat as honeydew,
init as icaco,
inspectMessage as ilama,
int as iceApple,
int8 as iceApple8,
int16 as iceApple16,
Expand All @@ -24,26 +22,21 @@ export {
nat16 as nectarine16,
nat32 as nectarine32,
nat64 as nectarine64,
Oneway as Orange,
Null as Nutmeg,
Opt as Olive,
$postUpgrade as $pomegranate,
$preUpgrade as $pineapple,
postUpgrade as pomegranate,
preUpgrade as pineapple,
principal as peach,
Principal as Peach,
$query as $quince,
Query as Quince,
query as quince,
Record as Raspberry,
reserved as rambutan,
Service as Strawberry,
serviceQuery as santol,
serviceUpdate as sapodilla,
StableBTreeMap as Soncoya,
text as tangerine,
Tuple as Tamarind,
$update as $ugni,
Update as Ugni,
update as ugni,
Variant as Voavanga,
Vec as Lime
Vec as Lime,
Void as Vanilla
} from 'azle';
export type blackberry = boolean;
export type nutmeg = null;
export type vanilla = void;
Loading

0 comments on commit bff5195

Please sign in to comment.