The optional third argument turns on (default) or off warnings about missing destination properties.
Due to the way Typescript works (as of v2.2), you should define your models so they always have default values. Otherwise, their properties will not be visible to the mapper.
Be sure the default values for iterables are empty iterables (both in the source and destination), otherwise the properties will be mapped like ordinary properties.
If providing model names as strings instead of references, then you must provide a model collection during import (see Setup).
If a source property exists while a destination does not, a warning will be issued by default. You can turn this off by providing a third parameter:
;mapper.mapMyWidget, json, false;
npm install --save-dev simple-mapper
// if you are using dependency injection, your setup might look like this:;;;diContainer.bindMapperServiceToken.toMapperService;// or with configuration...;diContainer.bindMapperServiceToken.tonew MapperServiceconfig, console;
npm run build to build the project. The build artifacts will be stored in the
Running unit tests
npm test to execute the unit tests.
npm run cover to run tests and generate a code coverage report.
Code coverage will be available at ./coverage/index.html.
The scaffolding exists, but no real documentation, for the moment. Run 'npm run compodoc' to generate documentation. Then run 'npm run compodoc-serve' to see auto-generated documentation and documentation coverage on port 8080.
Feel free to post issues.