Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: replace deprecated imports #66

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FpjsClient, GetOptions } from '@fingerprintjs/fingerprintjs-pro-spa'
import type { FingerprintJSPro, FpjsClient } from '@fingerprintjs/fingerprintjs-pro-spa'
import type { ClearCache, GetVisitorData } from './types'

type ClientMethods = {
Expand All @@ -10,7 +10,7 @@ export function makeClientMethods(client: FpjsClient): ClientMethods {
const initPromise = client.init()

const getVisitorData: GetVisitorData = async <TExtended extends boolean>(
agentOptions: GetOptions<TExtended>,
agentOptions: FingerprintJSPro.GetOptions<TExtended>,
ignoreCache?: boolean
) => {
if (typeof window === 'undefined') {
Expand Down
4 changes: 2 additions & 2 deletions src/mixins/mixins.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GetOptions } from '@fingerprintjs/fingerprintjs-pro-spa'
import type { FingerprintJSPro } from '@fingerprintjs/fingerprintjs-pro-spa'
import type { FpjsVisitorQueryData, FpjsVueGlobalClient, GetDataOptions } from '../types'

export type FpjsGetVisitorDataMethodThis = {
Expand All @@ -8,7 +8,7 @@ export type FpjsGetVisitorDataMethodThis = {
$fpjs?: FpjsVueGlobalClient
}

export type GetVisitorDataMethodParams = Omit<GetOptions<boolean>, 'extendedResult'> & GetDataOptions
export type GetVisitorDataMethodParams = Omit<FingerprintJSPro.GetOptions<boolean>, 'extendedResult'> & GetDataOptions

export type FpjsGetVisitorDataMethod<This = FpjsGetVisitorDataMethodThis> = (
this: This,
Expand Down
5 changes: 3 additions & 2 deletions src/useVisitorData/useVisitorData.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { GetOptions, VisitorData } from '@fingerprintjs/fingerprintjs-pro-spa'
import type { FingerprintJSPro, VisitorData } from '@fingerprintjs/fingerprintjs-pro-spa'
import type { Ref } from 'vue'
import type { FpjsVisitorQueryData, GetDataOptions } from '../types'

Expand All @@ -13,4 +13,5 @@ export type UseGetVisitorDataResult<TExtended extends boolean> = AsRefs<FpjsVisi
getData: (options?: GetDataOptions) => Promise<VisitorData<TExtended> | undefined>
}

export type UseVisitorDataOptions<TExtended extends boolean> = GetOptions<TExtended> & Partial<GetDataOptions>
export type UseVisitorDataOptions<TExtended extends boolean> = FingerprintJSPro.GetOptions<TExtended> &
Partial<GetDataOptions>
Loading