Open json-derulo opened 2 months ago
Expected behavior
When omitting required attributes in the config, such as projectId or accountId, a type error should be thrown.
projectId
accountId
Actual behavior
No type error is being thrown. For example, the following code builds:
import { initializePhraseAppEditor } from 'ngx-translate-phraseapp'; initializePhraseAppEditor({});
But with this setup, on runtime the following error is thrown:
Config is not set up properly Please set up the PHRASEAPP_CONFIG object with `accountId` and `projectId`, as well as any other needed options.
It would be good to catch this already on build time by providing more accurate typings for the config.
Hi @json-derulo , thanks for reporting this. We will have a look into this.
Expected behavior
When omitting required attributes in the config, such as
projectId
oraccountId
, a type error should be thrown.Actual behavior
No type error is being thrown. For example, the following code builds:
But with this setup, on runtime the following error is thrown:
It would be good to catch this already on build time by providing more accurate typings for the config.