GeekyAnts / GeekyAnts/NativeBase

Type definitions have inconsistencies

Open
#5,556 3 comments 0 reactions 0 assignees View on GitHub
bug PR Added triage v3
Dominant language
TypeScript
Stars
20.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

### Description

Certain type definitions for extendedTheme are inconsistent typings.

### CodeSandbox/Snack link

https://codesandbox.io/s/amazing-meitner-gfmeei?file=/src/App.tsx

### Steps to reproduce

1. Go to 'native-base/lib/typescript/core/extendedTheme.d.ts'
3. Scroll down to 'letterSpacings:{}'
4. See object:
```
letterSpacings: {
xs: string;
sm: string;
md: number; <-- random number type among strings
lg: string;
xl: string;
'2xl': string;
};
```

### NativeBase Version

3.3.3

### Platform

- [ ] Android
- [ ] CRA
- [ ] Expo
- [ ] iOS
- [ ] Next

### Other Platform

_No response_

### Additional Information

You can see in the 'letterSpacings' object that 'md' is a number when all others are strings this works fine if you keep the standard definitions defined by native-base but working with a design system causes issues with token import mapping. It would be nice if the native-base objects contained the same type for all values to keep consistency with design tokens.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.