diff --git a/.gitignore b/.gitignore index ed1bf77..7b0fd02 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ out/ node_modules/ +src/test.ts diff --git a/src/index.ts b/src/index.ts index 6f38342..1ce5f3e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,6 @@ export * as ser from './ser' export * as de from './de' export * as json from './json' +export * from './decorator' +export * from './options' diff --git a/src/test.ts b/src/test.ts deleted file mode 100644 index 939edb0..0000000 --- a/src/test.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { CaseConvention } from './case' -import { deserialize } from './de' -import { Serde, serde } from './decorator' -import { fromString, toString } from './json' -import { serialize } from './ser' - -const InnerStruct = deserialize(serialize( - class { - c = 'awawa' - })) - -const TestStruct = deserialize(serialize( - serde({ renameAll: CaseConvention.PascalCase })( - class { - a = 1 - b - inner = new InnerStruct() - d = true - e = Math.pow(2, 53) - f = Symbol('test') - g = [1, 'a', [3]] - - constructor() { - this.b = new Map() - this.b.set('test key', 2) - } - }))) - -const test = new TestStruct() -console.log(test) -const value = toString(test) -console.log('A', value) -const test2 = fromString(value, TestStruct) -console.log(test2) - - -