File tree Expand file tree Collapse file tree 8 files changed +17
-13
lines changed Expand file tree Collapse file tree 8 files changed +17
-13
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @emotion/is-prop-valid ' : minor
3
+ ---
4
+
5
+ Source code has been migrated to TypeScript. From now on type declarations will be emitted based on that, instead of being hand-written.
Original file line number Diff line number Diff line change <
8000
td data-grid-cell-id="diff-ea92ceb68d9de797ff6ccd926051ee30fd069382b1d5d0989626bc25582182de-4-4-0" data-selected="false" role="gridcell" style="background-color:var(--bgColor-default);text-align:center" tabindex="-1" valign="top" class="focusable-grid-cell diff-line-number position-relative diff-line-number-neutral left-side">4
4
"description" : " A function to check whether a prop is valid for HTML and SVG elements" ,
5
5
"main" : " dist/emotion-is-prop-valid.cjs.js" ,
6
6
"module" : " dist/emotion-is-prop-valid.esm.js" ,
7
- "types" : " types/index .d.ts" ,
7
+ "types" : " dist/emotion-is-prop-valid.cjs .d.ts" ,
8
8
"license" : " MIT" ,
9
9
"repository" : " https://github.com/emotion-js/emotion/tree/main/packages/is-prop-valid" ,
10
10
"scripts" : {
21
21
},
22
22
"files" : [
23
23
" src" ,
24
- " dist" ,
25
- " types/*.d.ts"
24
+ " dist"
26
25
],
27
26
"browser" : {
28
27
"./dist/emotion-is-prop-valid.cjs.js" : " ./dist/emotion-is-prop-valid.browser.cjs.js" ,
Original file line number Diff line number Diff line change 1
1
import memoize from '@emotion/memoize'
2
2
3
- /*
4
- declare var codegen: { require: string => RegExp }
5
- */
3
+ declare const codegen : { require : ( path : string ) => any }
6
4
7
5
// eslint-disable-next-line no-undef
8
- const reactPropsRegex = codegen . require ( './props' )
6
+ const reactPropsRegex : RegExp = codegen . require ( './props' )
9
7
10
8
// https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
11
9
const isPropValid = /* #__PURE__ */ memoize (
Original file line number Diff line number Diff line change
1
+ /**
2
+ * This module needs to remain pure JavaScript for codegen to work on it
3
+ */
1
4
const props = {
2
5
// react props
3
6
// https://github.com/facebook/react/blob/5495a7f24aef85ba6937truetrue1ce962673ca9f5fde6/src/renderers/dom/shared/hooks/ReactDOMUnknownPropertyHook.js
Original file line number Diff line number Diff line change 1
- // Definitions by: Junyoung Clare Jang <https://github.com/Ailrun>
2
1
// TypeScript Version: 2.1
3
2
4
- declare function isPropValid ( string : PropertyKey ) : boolean
5
- export default isPropValid
3
+ export { default } from '../src'
Original file line number Diff line number Diff line change 17
17
" check-preblock"
18
18
],
19
19
20
- "no-unnecessary-generics" : false
20
+ "no-unnecessary-generics" : false ,
21
+ "no-default-import" : false
21
22
}
22
23
}
Original file line number Diff line number Diff line change 1
- import memoize from '../src '
1
+ import memoize from '@emotion/memoize '
2
2
3
3
// $ExpectType string[]
4
4
memoize ( ( arg : string ) => [ arg ] ) ( 'foo' )
Original file line number Diff line number Diff line change 1
- import weakMemoize from '../src '
1
+ import weakMemoize from '@emotion/weak-memoize '
2
2
3
3
interface Foo {
4
4
bar : 'xyz'
You can’t perform that action at this time.
0 commit comments