Comments (2)
Hi,
to answer your questions:
- Array are not optional because Strapi send array empty, not undefined or null (i don't use GraphQL personally). Maybe an option in the configuration for this behavior would be useful.
- Have you tried something like:
// .stsconfig interfaceName: (name) => name.charAt(0).toUpperCase() + name.slice(1), // => role.ts export interface Role { ...
or// .stsconfig interfaceName: (name) => name.toUpperCase(), // => role.ts export interface ROLE { ...
Maybe I don't quite understand your need.I also had the need to import data when starting Strapi with an empty database. I wrote a function in
config/functions/bootstrap.js
for this. I can share some of this if you need to.Thanks for your feedback
from strapi-to-typescript.
aperron commented on September 29, 2024 I add a new option for collection. see v2.0.1
from strapi-to-typescript.
Related Issues (20)
- Fail when collection relates to itself - old issue again HOT 10
- 2.0.7 completely broken on Windows
- "id" field type on relational vs mongo HOT 1
- TypeError: Cannot read property 'name' of undefined HOT 1
- Suggestion: Allow to use a prettier config HOT 1
- Dynamic zone, Date types bug HOT 3
- Underscore issue HOT 2
- Failure when /components is empty HOT 1
- type 'file' unknown HOT 3
- Question: __typename and how handle it with Typescript HOT 5
- Fields of an interface referencing itself generates an invalid import statement
- Would be helpful to get created_at and updated_at to be added to generated models HOT 4
- components containing a "-" not replaced HOT 1
- component with the same name not created HOT 1
- Compatibility with `strapi-supercharged` HOT 1
- Array type relations and components are always generated as mandatory HOT 5
- Can we exclude files/folders from the generation? HOT 1
- Add support for Strapi version 4 HOT 3
- Add support for Strapi version 4 HOT 7
- Strapi v4 support? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
Jobs
Jooble
from strapi-to-typescript.