Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
280b9f98
Unverified
Commit
280b9f98
authored
Nov 15, 2023
by
Janicklas Ralph
Committed by
GitHub
Nov 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add types to package.json (#58420)
cc: @housseindjirdeh
parent
f99242ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
14 deletions
+17
-14
package.json
packages/third-parties/package.json
+1
-0
gtm.tsx
packages/third-parties/src/google/gtm.tsx
+1
-14
google.ts
packages/third-parties/src/types/google.ts
+15
-0
No files found.
packages/third-parties/package.json
View file @
280b9f98
...
...
@@ -8,6 +8,7 @@
"exports"
:
{
"./google"
:
"./dist/google/index.js"
},
"types"
:
"dist/types/google.d.ts"
,
"files"
:
[
"dist"
],
...
...
packages/third-parties/src/google/gtm.tsx
View file @
280b9f98
...
...
@@ -3,20 +3,7 @@
import
React
from
'react'
import
Script
from
'next/script'
declare
global
{
interface
Window
{
dataLayer
?:
Object
[]
[
key
:
string
]:
any
}
}
type
GTMParams
=
{
gtmId
:
string
dataLayer
?:
string
[]
dataLayerName
?:
string
auth
?:
string
preview
?:
string
}
import
type
{
GTMParams
}
from
'../types/google'
let
currDataLayerName
:
string
|
undefined
=
undefined
...
...
packages/third-parties/src/types/google.ts
View file @
280b9f98
declare
global
{
interface
Window
{
dataLayer
?:
Object
[]
[
key
:
string
]:
any
}
}
export
type
GTMParams
=
{
gtmId
:
string
dataLayer
?:
string
[]
dataLayerName
?:
string
auth
?:
string
preview
?:
string
}
export
type
GoogleMapsEmbed
=
{
height
?:
number
width
?:
number
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment