Skip to content

Commit

Permalink
Testing with exported anmespace and types
Browse files Browse the repository at this point in the history
  • Loading branch information
craigbeck committed Dec 12, 2023
1 parent e4dc61c commit da0beb4
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"version": "1.1.0",
"main": "./lib/index.js",
"files": [
"lib/**/*.js"
"lib/"
],
"scripts": {
"build": "node_modules/.bin/tsc",
Expand Down
29 changes: 28 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
import { Racer } from './Racer';
module.exports = new Racer();
import { Model } from './Model';
import * as util from './util';
import { RacerBackend } from './Backend';
import { Query } from './Model/Query';

// module.exports = new Racer();
const { use, serverUse } = util;

export { Model };
export { Query };
export { Racer };
export { RacerBackend };
export { use, serverUse };
export { util };
export const racer = new Racer();

export function createModel(data) {
var model = new Model();
if (data) {
model.createConnection(data);
model.unbundle(data);
}
return model;
}

export function createBackend(options) {
return new RacerBackend(racer, options);
};
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
"module": "CommonJS",
"noImplicitUseStrict": true,
"outDir": "lib",
"target": "ES5",
"sourceMap": false,
"target": "ES5"
"declaration": true,
"declarationMap": false,
},
"include": [
"src/**/*"
Expand Down

0 comments on commit da0beb4

Please sign in to comment.