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

rollup type definitions #2301

Merged
merged 3 commits into from
Feb 10, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
image
🤷

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