From ce0d28a20bbc6a01e7b461be12a6a0a150dd39c7 Mon Sep 17 00:00:00 2001 From: Daniel O'Grady <103028279+daogrady@users.noreply.github.com> Date: Thu, 20 Jul 2023 17:08:58 +0200 Subject: [PATCH] Strict Properties (#28) * Change emitted base type to object * Add changelog entry --- CHANGELOG.md | 3 +++ lib/visitor.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90b77c13..195041df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). ## Version 0.4.1 - TBD +### Changed +- Facilitate strict property checks. Note: `checkJs: true` must be present in the project's _jsconfig.json_ or _tsconfig.json_ respectively for this feature to become effective + ### Added - Support for `array of` syntax diff --git a/lib/visitor.js b/lib/visitor.js index c447ed4a..b4bb113d 100644 --- a/lib/visitor.js +++ b/lib/visitor.js @@ -124,7 +124,7 @@ class Visitor { }) // CLASS ASPECT - buffer.add(`export function ${identAspect(clean)} any>(Base: TBase) {`) + buffer.add(`export function ${identAspect(clean)} object>(Base: TBase) {`) buffer.indent() buffer.add(`return class ${clean} extends Base {`) buffer.indent()