Skip to content

Commit 819070f

Browse files
committed
remove extra comment types
1 parent 1dea229 commit 819070f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/cache/src/index.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ let getSourceMap: ((styles: string) => string | undefined) | undefined
4343
if (isDevelopment) {
4444
let sourceMapPattern =
4545
/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g
46-
getSourceMap = (styles /*: string */) => {
46+
getSourceMap = styles => {
4747
let matches = styles.match(sourceMapPattern)
4848
if (!matches) return
4949
return matches[matches.length - 1]
@@ -69,14 +69,14 @@ let createCache = (options: Options): EmotionCache => {
6969
// document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
7070
// note this very very intentionally targets all style elements regardless of the key to ensure
7171
// that creating a cache works inside of render of a React component
72-
Array.prototype.forEach.call(ssrStyles, (node /*: HTMLStyleElement */) => {
72+
Array.prototype.forEach.call(ssrStyles, (node: HTMLStyleElement) => {
7373
// we want to only move elements which have a space in the data-emotion attribute value
7474
// because that indicates that it is an Emotion 11 server-side rendered style elements
7575
// while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector
7676
// Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)
7777
// so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles
7878
// will not result in the Emotion 10 styles being destroyed
79-
const dataEmotionAttribute = node.getAttribute('data-emotion')
79+
const dataEmotionAttribute = node.getAttribute('data-emotion')!
8080
if (dataEmotionAttribute.indexOf(' ') === -1) {
8181
return
8282
}
@@ -168,7 +168,7 @@ let createCache = (options: Options): EmotionCache => {
168168
let sourceMap = getSourceMap(serialized.styles)
169169
if (sourceMap) {
170170
currentSheet = {
171-
insert: (rule /*: string */) => {
171+
insert: rule => {
172172
sheet.insert(rule + sourceMap)
173173
}
174174
}

0 commit comments

Comments
 (0)