Skip to content

Commit

Permalink
test: resolve type issue on TypeScript based configs
Browse files Browse the repository at this point in the history
  • Loading branch information
xeho91 committed Apr 2, 2023
1 parent 91216f4 commit 9d4b5a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions test/fixtures/config-autoload/ts/array/postcss.config.cts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { Config } from 'postcss-load-config';
import type { Config as PostCSSConfig } from 'postcss-load-config';
import { Configuration as WebpackConfig } from 'webpack';

module.exports = function (api: Config) {
module.exports = function (api: WebpackConfig): PostCSSConfig {
return {
parser: 'sugarss',
syntax: 'sugarss',
// FIXME: To confirm. Apparently there's no longer an available option `mode`?
map: api.mode === 'development' ? 'inline' : false,
from: './test/fixtures/config-autoload/js/object/index.css',
to: './test/fixtures/config-autoload/js/object/expect/index.css',
Expand Down
6 changes: 3 additions & 3 deletions test/fixtures/config-autoload/ts/object/postcss.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { Config } from 'postcss-load-config';
import type { Config as PostCSSConfig } from 'postcss-load-config';
import { Configuration as WebpackConfig } from 'webpack';

const config = function (api: Config) {
const config = function (api: WebpackConfig): PostCSSConfig {
return {
parser: 'sugarss',
syntax: 'sugarss',
// FIXME: To confirm. Apparently there's no longer an available option `mode`?
map: api.mode === 'development' ? 'inline' : false,
from: './test/fixtures/config-autoload/js/object/index.css',
to: './test/fixtures/config-autoload/js/object/expect/index.css',
Expand Down

0 comments on commit 9d4b5a3

Please sign in to comment.