|
||
---|---|---|
src | ||
test | ||
.gitignore | ||
.npmignore | ||
LICENSE.txt | ||
README.md | ||
gulpfile.js | ||
karma.conf.js | ||
package.json | ||
tsconfig.json | ||
typings.json | ||
webpack.config.js | ||
webpack.test.config.js | ||
webpack.test.tsconfig.json |
README.md
powerbi-models
Contains JavaScript & TypeScript object models for Microsoft Power BI JavaScript SDK.
For each model there is a TypeScript interface, a json schema definitions, and a validation function to ensure and object is valid.
Getting Started
Install
npm install --save powerbi-models
Import
import * as models from 'powerbi-models';
Usage
let testObject = { x: 1 };
const errors = models.validateLoad(testObject);
if(errors) {
console.warn(errors);
}
Would output to the console:
[
{
message: 'accessToken is required'
}
]