Skip to content

Commit

Permalink
rollup type definitions (#2301)
Browse files Browse the repository at this point in the history
* rollup type definitions

* configure

* Update src/Row.tsx

Co-authored-by: Aman Mahajan <amahajan@stratag.com>

Co-authored-by: Aman Mahajan <amahajan@stratag.com>
  • Loading branch information
nstepien and amanmahajan7 committed Feb 10, 2021
1 parent a6fc34a commit 8e25e00
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/lib
/node_modules
/storybook-static
/tmp
/.eslintcache
/package-lock.json

Expand Down
35 changes: 35 additions & 0 deletions api-extractor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "<projectFolder>/tmp/index.d.ts",
"apiReport": {
"enabled": false
},
"docModel": {
"enabled": false
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "<projectFolder>/lib/index.d.ts"
},
"tsdocMetadata": {
"enabled": false
},
"newlineKind": "lf",
"messages": {
"compilerMessageReporting": {
"default": {
"logLevel": "warning"
}
},
"extractorMessageReporting": {
"default": {
"logLevel": "none"
}
},
"tsdocMessageReporting": {
"default": {
"logLevel": "none"
}
}
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"eslint:fix": "npm run eslint -- --fix",
"typecheck": "tsc -p tsconfig.all.json",
"build-storybook": "build-storybook --quiet",
"prepublishOnly": "npm install && npm run build && tsc",
"prepublishOnly": "npm install && npm run build && tsc && api-extractor run --local --verbose",
"postpublish": "git push --follow-tags origin HEAD"
},
"dependencies": {
Expand All @@ -56,6 +56,7 @@
"@linaria/rollup": "^3.0.0-beta.1",
"@linaria/shaker": "^3.0.0-beta.1",
"@linaria/webpack-loader": "^3.0.0-beta.1",
"@microsoft/api-extractor": "^7.13.1",
"@popperjs/core": "^2.6.0",
"@rollup/plugin-babel": "^5.2.2",
"@rollup/plugin-node-resolve": "^11.0.1",
Expand Down
3 changes: 2 additions & 1 deletion src/Cell.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { forwardRef, memo } from 'react';
import type { RefAttributes } from 'react';
import { css } from '@linaria/core';

import { cellSelectedClassname } from './style';
Expand Down Expand Up @@ -129,4 +130,4 @@ function Cell<R, SR>({
);
}

export default memo(forwardRef(Cell)) as <R, SR = unknown>(props: CellRendererProps<R, SR> & React.RefAttributes<HTMLDivElement>) => JSX.Element;
export default memo(forwardRef(Cell)) as <R, SR = unknown>(props: CellRendererProps<R, SR> & RefAttributes<HTMLDivElement>) => JSX.Element;
3 changes: 2 additions & 1 deletion src/DataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
useImperativeHandle,
useCallback
} from 'react';
import type { RefAttributes } from 'react';
import clsx from 'clsx';

import { rootClassname, viewportDraggingClassname, focusSinkClassname } from './style';
Expand Down Expand Up @@ -963,4 +964,4 @@ function DataGrid<R, SR>({
);
}

export default forwardRef(DataGrid) as <R, SR = unknown>(props: DataGridProps<R, SR> & React.RefAttributes<DataGridHandle>) => JSX.Element;
export default forwardRef(DataGrid) as <R, SR = unknown>(props: DataGridProps<R, SR> & RefAttributes<DataGridHandle>) => JSX.Element;
3 changes: 2 additions & 1 deletion src/Row.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { memo, forwardRef } from 'react';
import type { RefAttributes } from 'react';
import clsx from 'clsx';

import { groupRowSelectedClassname, rowClassname, rowSelectedClassname } from './style';
Expand Down Expand Up @@ -93,4 +94,4 @@ function Row<R, SR = unknown>({
);
}

export default memo(forwardRef(Row)) as <R, SR = unknown>(props: RowRendererProps<R, SR> & React.RefAttributes<HTMLDivElement>) => JSX.Element;
export default memo(forwardRef(Row)) as <R, SR = unknown>(props: RowRendererProps<R, SR> & RefAttributes<HTMLDivElement>) => JSX.Element;
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
Expand All @@ -11,7 +12,7 @@
"moduleResolution": "node",
"noImplicitReturns": true,
"noUnusedLocals": true,
"outDir": "lib",
"outDir": "tmp",
"pretty": true,
"strict": true,
"target": "esnext",
Expand Down

0 comments on commit 8e25e00

Please sign in to comment.