Skip to content

Commit

Permalink
Run prettier
Browse files Browse the repository at this point in the history
Signed-off-by: artem.ivanov <artem.ivanov@dsr-corporation.com>
  • Loading branch information
Artemkaaas committed Dec 8, 2023
1 parent 00d3a15 commit 77d9421
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 78 deletions.
84 changes: 42 additions & 42 deletions wrappers/javascript/packages/anoncreds-nodejs/src/ffi/serialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,48 +24,48 @@ export type SerializedOptions<Type> = Required<{
[Property in keyof Type]: Type[Property] extends string
? string
: Type[Property] extends number
? number
: Type[Property] extends boolean
? number
: Type[Property] extends boolean | undefined
? number
: Type[Property] extends Record<string, unknown>
? string
: Type[Property] extends string[]
? Buffer
: Type[Property] extends string[] | undefined
? Buffer
: Type[Property] extends number[]
? Buffer
: Type[Property] extends number[] | undefined
? Buffer
: Type[Property] extends Date
? number
: Type[Property] extends Date | undefined
? number
: Type[Property] extends string | undefined
? string
: Type[Property] extends number | undefined
? number
: Type[Property] extends Buffer
? Buffer
: Type[Property] extends ObjectHandle
? number
: Type[Property] extends ObjectHandle[]
? Buffer
: Type[Property] extends ObjectHandle[] | undefined
? Buffer
: Type[Property] extends ObjectHandle | undefined
? number
: Type[Property] extends Uint8Array
? typeof ByteBufferStruct
: Type[Property] extends Uint8Array | undefined
? typeof ByteBufferStruct
: Type[Property] extends unknown[] | undefined
? string
: Type[Property] extends Record<string, unknown> | undefined
? string
: unknown
? number

Check failure on line 27 in wrappers/javascript/packages/anoncreds-nodejs/src/ffi/serialize.ts

View workflow job for this annotation

GitHub Actions / Build and Test JavaScript wrapper

Delete `··`
: Type[Property] extends boolean

Check failure on line 28 in wrappers/javascript/packages/anoncreds-nodejs/src/ffi/serialize.ts

View workflow job for this annotation

GitHub Actions / Build and Test JavaScript wrapper

Delete `··`
? number

Check failure on line 29 in wrappers/javascript/packages/anoncreds-nodejs/src/ffi/serialize.ts

View workflow job for this annotation

GitHub Actions / Build and Test JavaScript wrapper

Delete `····`
: Type[Property] extends boolean | undefined

Check failure on line 30 in wrappers/javascript/packages/anoncreds-nodejs/src/ffi/serialize.ts

View workflow job for this annotation

GitHub Actions / Build and Test JavaScript wrapper

Delete `····`
? number

Check failure on line 31 in wrappers/javascript/packages/anoncreds-nodejs/src/ffi/serialize.ts

View workflow job for this annotation

GitHub Actions / Build and Test JavaScript wrapper

Replace `··········` with `····`
: Type[Property] extends Record<string, unknown>

Check failure on line 32 in wrappers/javascript/packages/anoncreds-nodejs/src/ffi/serialize.ts

View workflow job for this annotation

GitHub Actions / Build and Test JavaScript wrapper

Delete `······`
? string

Check failure on line 33 in wrappers/javascript/packages/anoncreds-nodejs/src/ffi/serialize.ts

View workflow job for this annotation

GitHub Actions / Build and Test JavaScript wrapper

Delete `········`
: Type[Property] extends string[]

Check failure on line 34 in wrappers/javascript/packages/anoncreds-nodejs/src/ffi/serialize.ts

View workflow job for this annotation

GitHub Actions / Build and Test JavaScript wrapper

Delete `········`
? Buffer

Check failure on line 35 in wrappers/javascript/packages/anoncreds-nodejs/src/ffi/serialize.ts

View workflow job for this annotation

GitHub Actions / Build and Test JavaScript wrapper

Delete `··········`
: Type[Property] extends string[] | undefined

Check failure on line 36 in wrappers/javascript/packages/anoncreds-nodejs/src/ffi/serialize.ts

View workflow job for this annotation

GitHub Actions / Build and Test JavaScript wrapper

Delete `··········`
? Buffer
: Type[Property] extends number[]
? Buffer
: Type[Property] extends number[] | undefined
? Buffer
: Type[Property] extends Date
? number
: Type[Property] extends Date | undefined
? number
: Type[Property] extends string | undefined
? string
: Type[Property] extends number | undefined
? number
: Type[Property] extends Buffer
? Buffer
: Type[Property] extends ObjectHandle
? number
: Type[Property] extends ObjectHandle[]
? Buffer
: Type[Property] extends ObjectHandle[] | undefined
? Buffer
: Type[Property] extends ObjectHandle | undefined
? number
: Type[Property] extends Uint8Array
? typeof ByteBufferStruct
: Type[Property] extends Uint8Array | undefined
? typeof ByteBufferStruct
: Type[Property] extends unknown[] | undefined
? string
: Type[Property] extends Record<string, unknown> | undefined
? string
: unknown
}>

// TODO: this method needs to be reworked.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,28 @@ export type SerializedOptions<Type> = {
[Property in keyof Type]: Type[Property] extends string
? string
: Type[Property] extends boolean
? number
: Type[Property] extends Record<string, string>
? string
: Type[Property] extends Record<string, string> | undefined
? string | undefined
: Type[Property] extends ObjectHandle[]
? number[]
: Type[Property] extends ObjectHandle[] | undefined
? number[]
: Type[Property] extends string[]
? string[]
: Type[Property] extends string[] | undefined
? string[]
: Type[Property] extends Date
? number
: Type[Property] extends Date | undefined
? number | undefined
: Type[Property] extends ObjectHandle
? number
: Type[Property] extends ObjectHandle | undefined
? number | undefined
: Type[Property]
? number
: Type[Property] extends Record<string, string>
? string
: Type[Property] extends Record<string, string> | undefined
? string | undefined
: Type[Property] extends ObjectHandle[]
? number[]
: Type[Property] extends ObjectHandle[] | undefined
? number[]
: Type[Property] extends string[]
? string[]
: Type[Property] extends string[] | undefined
? string[]
: Type[Property] extends Date
? number
: Type[Property] extends Date | undefined
? number | undefined
: Type[Property] extends ObjectHandle
? number
: Type[Property] extends ObjectHandle | undefined
? number | undefined
: Type[Property]
}

const serialize = (arg: Argument): SerializedArgument => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ export class Credential extends AnoncredsObject {
options.revocationRegistryDefinition instanceof RevocationRegistryDefinition
? options.revocationRegistryDefinition.handle
: options.revocationRegistryDefinition !== undefined
? pushToArray(
RevocationRegistryDefinition.fromJson(options.revocationRegistryDefinition).handle,
objectHandles
)
: undefined
? pushToArray(
RevocationRegistryDefinition.fromJson(options.revocationRegistryDefinition).handle,
objectHandles
)
: undefined

credential = anoncreds.processCredential({
credential: this.handle,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ export class Presentation extends AnoncredsObject {
item.revocationState instanceof CredentialRevocationState
? item.revocationState.handle
: item.revocationState !== undefined
? pushToArray(CredentialRevocationState.fromJson(item.revocationState).handle, objectHandles)
: undefined,
? pushToArray(CredentialRevocationState.fromJson(item.revocationState).handle, objectHandles)
: undefined,

timestamp: item.timestamp
})),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ export class W3CCredential extends AnoncredsObject {
options.revocationRegistryDefinition instanceof RevocationRegistryDefinition
? options.revocationRegistryDefinition.handle
: options.revocationRegistryDefinition !== undefined
? pushToArray(
RevocationRegistryDefinition.fromJson(options.revocationRegistryDefinition).handle,
objectHandles
)
: undefined
? pushToArray(
RevocationRegistryDefinition.fromJson(options.revocationRegistryDefinition).handle,
objectHandles
)
: undefined

credential = anoncreds.processW3CCredential({
credential: this.handle,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ export class W3CPresentation extends AnoncredsObject {
item.revocationState instanceof CredentialRevocationState
? item.revocationState.handle
: item.revocationState !== undefined
? pushToArray(CredentialRevocationState.fromJson(item.revocationState).handle, objectHandles)
: undefined,
? pushToArray(CredentialRevocationState.fromJson(item.revocationState).handle, objectHandles)
: undefined,

timestamp: item.timestamp
})),
Expand Down

0 comments on commit 77d9421

Please sign in to comment.