Skip to content

Commit

Permalink
update imports and typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
bdemann committed May 24, 2024
1 parent 8d5019d commit 4a7909b
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 55 deletions.
35 changes: 8 additions & 27 deletions examples/audio_recorder/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/audio_recorder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"devDependencies": {
"@dfinity/agent": "^0.19.3",
"ts-node": "10.7.0",
"typescript": "4.6.3"
"typescript": "5.2.2"
}
}
2 changes: 1 addition & 1 deletion examples/bitcoin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"devDependencies": {
"@dfinity/agent": "0.11.1",
"ts-node": "10.7.0",
"typescript": "4.6.3"
"typescript": "5.2.2"
}
}
2 changes: 1 addition & 1 deletion examples/canister/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"devDependencies": {
"@dfinity/agent": "^0.21.4",
"ts-node": "10.7.0",
"typescript": "4.6.3"
"typescript": "5.2.2"
}
}
2 changes: 1 addition & 1 deletion examples/complex_types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"devDependencies": {
"@dfinity/agent": "0.11.1",
"ts-node": "10.7.0",
"typescript": "4.6.3"
"typescript": "5.2.2"
}
}
2 changes: 1 addition & 1 deletion examples/func_types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"devDependencies": {
"@dfinity/agent": "0.11.1",
"ts-node": "10.7.0",
"typescript": "4.6.3"
"typescript": "5.2.2"
}
}
40 changes: 18 additions & 22 deletions src/lib/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,25 @@ import { IncomingMessageForServer } from 'http';
// @ts-ignore
import httpMessageParser from 'http-message-parser';

import {
blob,
bool,
CandidType,
Canister,
Func,
ic,
init,
Manual,
nat16,
None,
Opt,
postUpgrade,
query,
Record,
Some,
text,
Tuple,
update,
Variant,
Vec
} from '.';
import { CandidType } from './candid/candid_type';
import { Manual } from './candid/manual';
import { blob } from './candid/types/constructed/blob';
import { None, Opt, Some } from './candid/types/constructed/opt';
import { Record } from './candid/types/constructed/record';
import { Tuple } from './candid/types/constructed/tuple';
import { Variant } from './candid/types/constructed/variant';
import { Vec } from './candid/types/constructed/vec';
import { bool } from './candid/types/primitive/bool';
import { nat16 } from './candid/types/primitive/nats/nat16';
import { text } from './candid/types/primitive/text';
import { Func } from './candid/types/reference/func';
import { Canister } from './candid/types/reference/service/';
import { CanisterOptions } from './candid/types/reference/service/canister_function';
import { init } from './canister_methods/methods/init';
import { postUpgrade } from './canister_methods/methods/post_upgrade';
import { query } from './canister_methods/methods/query';
import { update } from './canister_methods/methods/update';
import { ic } from './ic';

export type HeaderField = [text, text];
export const HeaderField = Tuple(text, text);
Expand Down
2 changes: 1 addition & 1 deletion test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { execSync } from 'child_process';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const deepEqual = require('deep-is');

import { jsonStringify } from '../src/lib';
import { jsonStringify } from '../src/lib/json';

export type Test<Context = any> = {
name: string;
Expand Down

0 comments on commit 4a7909b

Please sign in to comment.