Open nitro-neal opened 2 months ago
Filed another issue here since I'm seeing this on published dids as well: https://github.com/TBD54566975/tbdex-js/issues/259
here is my method signature:
public static async import({ portableDid, keyManager = new LocalKeyManager() }: {
if I do this it works: customerDid = await DidDht.import({ portableDid });
if I mistakenly do this it still compiles and crashes later on:
customerDid = await DidDht.import({ customerPortableDid });
Can I change my message signaure or some typescript compile time thing to not let this happen?
chat gpt has a solution: https://chatgpt.com/share/e/311e2c09-953a-42c9-9008-d90bfe9d1507
Updated: Scroll to bottom - https://github.com/TBD54566975/web5-js/issues/740#issuecomment-2233929020
Make sure we can import a portable did:dht that is no published.
this did looks valid but it crashes on import, maybe becasue published is false.