Dynamoose: TS: Cant define simple Array schema

Created on 8 Jun 2020  路  7Comments  路  Source: dynamoose/dynamoose

Schema copied from the docs:

{
    "friends": {
        "type": Array,
        "schema": [String]
    }
}

Error:

Type 'StringConstructor[]' is not assignable to type 'SchemaDefinition | SchemaDefinition[]'

stale bug

All 7 comments

The program would run well. To resolve, Add //@ts-ignore above the error like below

{
     // @ts-ignore
    "friends": {
        "type": Array,
        "schema": [String]
    }
}

I think this is a duplicate of #854

This issue is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 3 days.

Please dont close unresolved issues just because there was no activity for a week 馃様

@MickL This is getting extremely common in open source projects to have it automatically close issues after a period of inactivity. I mentioned that this looks to be a duplicate of #854. No one replied for an extended period of time. Why shouldn't this issue be closed if no one replies? Otherwise it just adds more issues that aren't relevant. Duplicate issues shouldn't remain open.

A good option in this case would be to reply to my comment saying that this issue is not a duplicate of #854 and explain why, OR agree that it's a duplicate and close the issue yourself. Ignoring just means that the system is gonna assume I'm correct and close it. Which I believe is a perfectly fair assumption. Now if you were just busy or forget to reply, it gives you a reminder that it's stale, and you can fix it by commenting and replying to me. However, just arguing that it shouldn't be closed without replying to what I originally said, doesn't help.

The alternative for this case is that I would have closed the issue right away when I said it's a duplicate of #854. OR, I would have to waste time every so often manually cleaning up issues, which takes time away from me being able to do other things.


For now, I'm going to close this issue. If you believe it's not a duplicate, feel free to comment about why you believe it's not a duplicate and I'll consider reopening.

I dont know if this is a duplicate I didnt write the code. For me it looks different but I dont know the code. If you think it is a duplicate why not close it right away?

@MickL Great. In this case, it is confirmed as a duplicate due to the tests done in #952.

Because I think it's important to get feedback from users. I've made mistakes before. I've said that it looks like a duplicate of something else, but the original issue author explains why it isn't or doesn't look to be the same. The reality is if I closed this issue right away, there would be people asking why I closed it right away. There is no way to make everyone happy. However, this system so far has worked the best. It's automated, gives people time to discuss further, and closes inactive issues/PRs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ricxsar picture ricxsar  路  4Comments

diosney picture diosney  路  7Comments

Mojo90 picture Mojo90  路  10Comments

markronquillo picture markronquillo  路  3Comments

jornki picture jornki  路  3Comments