diff --git a/packages/concerto-core/api.txt b/packages/concerto-core/api.txt index 4465835d5b..d73f0f71ba 100644 --- a/packages/concerto-core/api.txt +++ b/packages/concerto-core/api.txt @@ -209,6 +209,7 @@ class ModelManager { + void clearModelFiles() + ModelFile getModelFile(string) + string[] getNamespaces() + + ClassDeclaration getType(string) throws TypeNotFoundException + AssetDeclaration[] getAssetDeclarations() + TransactionDeclaration[] getTransactionDeclarations() + EventDeclaration[] getEventDeclarations() @@ -228,7 +229,7 @@ class Serializer { + void constructor(Factory,ModelManager,object?) + void setDefaultOptions(Object) + Object toJSON(Resource,Object?,boolean?,boolean?,boolean?,boolean?,boolean?,number?) throws Error - + Resource fromJSON(Object,Object,boolean,boolean,number?) + + Resource fromJSON(Object,Object?,boolean,boolean,number?) } class TypeNotFoundException extends BaseException { + void constructor(string,string?,string) diff --git a/packages/concerto-core/changelog.txt b/packages/concerto-core/changelog.txt index 565037792a..a0c9e86d86 100644 --- a/packages/concerto-core/changelog.txt +++ b/packages/concerto-core/changelog.txt @@ -24,7 +24,7 @@ # Note that the latest public API is documented using JSDocs and is available in api.txt. # -Version 1.2.2 {e30709343834104db4936fc5f1c96091} 2021-11-24 +Version 1.2.2 {fb3110c45d21beac59b99bba03d41197} 2021-11-24 - Remove custom instanceof and add methods to check runtime type - Remove support for Node 12 - Generate Typescript definitions from JSDoc diff --git a/packages/concerto-core/lib/modelmanager.js b/packages/concerto-core/lib/modelmanager.js index 3b2f612dcf..c5f0d687c4 100644 --- a/packages/concerto-core/lib/modelmanager.js +++ b/packages/concerto-core/lib/modelmanager.js @@ -504,7 +504,6 @@ abstract concept Event {} * @param {string} qualifiedName - fully qualified type name. * @return {ClassDeclaration} - the class declaration for the specified type. * @throws {TypeNotFoundException} - if the type cannot be found or is a primitive type. - * @private */ getType(qualifiedName) { diff --git a/packages/concerto-core/lib/serializer.js b/packages/concerto-core/lib/serializer.js index 16966771fa..29f49cbbe1 100644 --- a/packages/concerto-core/lib/serializer.js +++ b/packages/concerto-core/lib/serializer.js @@ -132,7 +132,7 @@ class Serializer { * The Resource is populated based on the JavaScript object. * * @param {Object} jsonObject The JavaScript Object for a Resource - * @param {Object} options - the optional serialization options + * @param {Object} [options] - the optional serialization options * @param {boolean} options.acceptResourcesForRelationships - handle JSON objects * in the place of strings for relationships, defaults to false. * @param {boolean} options.validate - validate the structure of the Resource diff --git a/packages/concerto-core/types/lib/modelmanager.d.ts b/packages/concerto-core/types/lib/modelmanager.d.ts index 9253c99c66..0457345522 100644 --- a/packages/concerto-core/types/lib/modelmanager.d.ts +++ b/packages/concerto-core/types/lib/modelmanager.d.ts @@ -184,9 +184,8 @@ declare class ModelManager { * @param {string} qualifiedName - fully qualified type name. * @return {ClassDeclaration} - the class declaration for the specified type. * @throws {TypeNotFoundException} - if the type cannot be found or is a primitive type. - * @private */ - private getType; + getType(qualifiedName: string): ClassDeclaration; /** * Get the AssetDeclarations defined in this model manager * @return {AssetDeclaration[]} the AssetDeclarations defined in the model manager diff --git a/packages/concerto-core/types/lib/serializer.d.ts b/packages/concerto-core/types/lib/serializer.d.ts index e2758a8445..417df09ead 100644 --- a/packages/concerto-core/types/lib/serializer.d.ts +++ b/packages/concerto-core/types/lib/serializer.d.ts @@ -61,7 +61,7 @@ declare class Serializer { * The Resource is populated based on the JavaScript object. * * @param {Object} jsonObject The JavaScript Object for a Resource - * @param {Object} options - the optional serialization options + * @param {Object} [options] - the optional serialization options * @param {boolean} options.acceptResourcesForRelationships - handle JSON objects * in the place of strings for relationships, defaults to false. * @param {boolean} options.validate - validate the structure of the Resource @@ -69,7 +69,7 @@ declare class Serializer { * @param {number} [options.utcOffset] - UTC Offset for DateTime values. * @return {Resource} The new populated resource */ - fromJSON(jsonObject: any, options: { + fromJSON(jsonObject: any, options?: { acceptResourcesForRelationships: boolean; validate: boolean; utcOffset?: number; diff --git a/packages/concerto-util/lib/filedownloader.js b/packages/concerto-util/lib/filedownloader.js index fe4b0aa5ee..f566577e48 100644 --- a/packages/concerto-util/lib/filedownloader.js +++ b/packages/concerto-util/lib/filedownloader.js @@ -38,7 +38,6 @@ const handleJobError = async (error, job) => { class FileDownloader { /** * Create a FileDownloader and bind to a FileLoader. - * @constructor * @param {*} fileLoader - the loader to use to download model files * @param {*} getExternalImports - a function taking a file and returning new files * @param {Number} concurrency - the number of model files to download concurrently diff --git a/packages/concerto-util/types/lib/filedownloader.d.ts b/packages/concerto-util/types/lib/filedownloader.d.ts index 3a88206853..d155cdb7bd 100644 --- a/packages/concerto-util/types/lib/filedownloader.d.ts +++ b/packages/concerto-util/types/lib/filedownloader.d.ts @@ -6,7 +6,6 @@ export = FileDownloader; declare class FileDownloader { /** * Create a FileDownloader and bind to a FileLoader. - * @constructor * @param {*} fileLoader - the loader to use to download model files * @param {*} getExternalImports - a function taking a file and returning new files * @param {Number} concurrency - the number of model files to download concurrently diff --git a/packages/concerto-util/types/lib/loaders/compositefileloader.d.ts b/packages/concerto-util/types/lib/loaders/compositefileloader.d.ts index f556138b9c..cc6ec5fa03 100644 --- a/packages/concerto-util/types/lib/loaders/compositefileloader.d.ts +++ b/packages/concerto-util/types/lib/loaders/compositefileloader.d.ts @@ -17,7 +17,7 @@ declare class CompositeFileLoader { addFileLoader(fileLoader: any): void; /** * Get the array of FileLoader instances - * @return {*[]} The FileLoader registered + * @return {*} The FileLoader registered * @private */ private getFileLoaders;