Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LinguiConfig type from '@lingui/conf' has incorrect required props #1480

Closed
timofei-iatsenko opened this issue Mar 6, 2023 · 0 comments · Fixed by #1485
Closed

LinguiConfig type from '@lingui/conf' has incorrect required props #1480

timofei-iatsenko opened this issue Mar 6, 2023 · 0 comments · Fixed by #1485

Comments

@timofei-iatsenko
Copy link
Collaborator

// lingui.config.ts
import type { LinguiConfig } from '@lingui/conf';


const config: LinguiConfig = {
  locales: ['en', 'pl'],
  sourceLocale: 'en',
  catalogs: [{
    path: '<rootDir>/translates/{locale}',
    include: ['<rootDir>/src'],
  }],
  format: 'po',
};

export default config;

These properties should be enough to work, but LinguiConfig want to all properties being presented. So i have to write Partial<LinguiConfig>.

Solution:

We need to fix typings and mark not-required fields as optional and add a proper test for that (test-d.ts)

@timofei-iatsenko timofei-iatsenko changed the title LinguiConfig type from '@lingui/conf' has incorrect default required props LinguiConfig type from '@lingui/conf' has incorrect required props Mar 6, 2023
@andrii-bodnar andrii-bodnar linked a pull request Mar 8, 2023 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants