Skip to content

Commit

Permalink
Expose the types
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-s-ccs committed Nov 17, 2021
1 parent 09f6205 commit 1f62cec
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error"
},
"ignorePatterns": "lib/*"
"ignorePatterns": "dist/*"
}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.DS_Store
node_modules/*
.tmuxp.*
lib/*
dist/*
2 changes: 1 addition & 1 deletion package-lock.json

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

10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
"name": "ccs-prototype-kit-model-interface",
"version": "0.0.1",
"description": "An interface for the ccs-prototype-kit to allow for the use of a sudo database and models",
"main": "src/index",
"types": "",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "rm -rf ./lib/ && tsc",
"build": "rm -rf ./dist/ && tsc",
"prepare": "npm run build",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
Expand Down
4 changes: 2 additions & 2 deletions src/@types/frameworkConfig.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
type AppConfig = {
type FrameworkConfig = {
staticDataPath: string
activeDataSchemaPath: string
}

export default AppConfig
export default FrameworkConfig
10 changes: 10 additions & 0 deletions src/@types/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Export the data types
export { ActiveDataScheme, ActiveDataSchema} from './data/activeDataSchema'
export { DefaultRow } from './data/tables'

// Export the model types
export { ModelError, ListError, Condition } from './models/model'

// Export validation types
export { Schema } from './validation/schema'
export { ValidatorOptions, StringValidatorOptions, NumberValidatorOptions, ValidatorInterface } from './validation/validator'
6 changes: 4 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
"outDir": "./lib", /* Specify an output folder for all emitted files. */
"outDir": "./dist", /* Specify an output folder for all emitted files. */
// "removeComments": true, /* Disable emitting comments. */
// "noEmit": true, /* Disable emitting files from a compilation. */
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
Expand Down Expand Up @@ -96,5 +96,7 @@
/* Completeness */
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
"skipLibCheck": true /* Skip type checking all .d.ts files. */
}
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
}

0 comments on commit 1f62cec

Please sign in to comment.