From a907d78d6393ad8d171851d33fb080e04767326e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Marie=20De=20Mey?= Date: Sun, 3 Nov 2024 07:35:58 +0200 Subject: [PATCH] discussions --- README.md | 21 ++++++++++++++++++++- package.json | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 138d891..4a6f6c8 100644 --- a/README.md +++ b/README.md @@ -284,6 +284,25 @@ Yes, it's okay... So, secluding can also be useful when some class specify different methods with the same name, so that each has its unique version (unaccessible from outside) -# Participation +# Real world + +## Purpose + +Typescript offer simpler (typescript-wise) but more complex (development-wise) ways to reach the same functionalities (ie. [mixins](https://www.typescriptlang.org/docs/handbook/mixins.html)) + +In some production environment, these solutions might be preferred. + +Knowing that the whole documentation here is about rarely occurring edge cases and that [two chapters](#super) are usually enough to understand and use the library, `flat-diamond` here wish to offer: + +- A clean and working way to approach multiple inheritance - theoretically and practically +- A tool to write a highly readable, maintainable and dynamic code. Mainly for prototyping but that can fit in most production case. + > Some times, it's cheaper to just buy another RAM stick than to spend a week on an optimization +- Automate bookkeeping of types - task that can be tedious in TypeScript + +`flat-diamond` does not create security issues nor performance bottlenecks. It might add ~5Kb of code to load, it might add a little overtime on some function calls - but if a code does a bit more than calling NOOP billions of times, it is negligible. + +## Participation The best (even if not only) way to report a bug is to PR a failing unit test. + +The best way to participate is still to [leave a note](https://github.com/emedware/flat-diamond/discussions) when the package does not meet the expectations/answer questions. diff --git a/package.json b/package.json index 158b0c8..96367ae 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "types": "./lib/index.d.ts", "default": "./lib/cjs.js" }, - "./ts": "./src/index.ts" + "./src": "./src/index.ts" }, "description": "TypeScript diamond inheritance", "type": "module",