runtime-type-inspector 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runtime-type-inspector",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Validating JSDoc types at runtime for high-quality types - Trust is good, control is better.",
5
5
  "main": "src-transpiler/index.mjs",
6
6
  "scripts": {
@@ -1119,8 +1119,8 @@ class Stringifier {
1119
1119
  CommentBlock(node) {
1120
1120
  const {value} = node;
1121
1121
  const par = this.parents[this.parents.length - 3];
1122
- const out = `${this.spaces.slice(2)}/*${value}*/`
1123
- if (par?.type === 'BlockStatement') {
1122
+ const out = `${this.spaces.slice(2)}/*${value}*/`;
1123
+ if (par?.type === 'BlockStatement' || par?.type === 'Program') {
1124
1124
  return out + '\n';
1125
1125
  }
1126
1126
  return ' ' + out + ' ';