Skip to content

Commit 4d5596e

Browse files
added: types
1 parent 8fe867c commit 4d5596e

File tree

6 files changed

+3228
-1058
lines changed

6 files changed

+3228
-1058
lines changed

.github/workflows/test.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches: [ main, dev ]
6+
pull_request:
7+
branches: [ main, dev ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
node-version: [12.x, 14.x, 15.x, 16.x]
17+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Local Unit Test ${{ matrix.node-version }}
22+
uses: actions/setup-node@v1
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
- run: npm ci
26+
- run: npm test

.travis.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# bianco.css
22

3-
[![Build Status][travis-image]][travis-url]
4-
3+
[![Build Status][ci-image]][ci-url]
54
[![NPM version][npm-version-image]][npm-url]
65
[![NPM downloads][npm-downloads-image]][npm-url]
76
[![MIT License][license-image]][license-url]
@@ -12,9 +11,8 @@
1211
import css from 'bianco.css'
1312
```
1413

15-
[travis-image]: https://img.shields.io/travis/biancojs/css.svg?style=flat-square
16-
17-
[travis-url]: https://travis-ci.org/biancojs/css
14+
[ci-image]:https://img.shields.io/github/workflow/status/biancojs/css/test?style=flat-square
15+
[ci-url]:https://github.com/biancojs/css/actions
1816

1917
[license-image]: http://img.shields.io/badge/license-MIT-000000.svg?style=flat-square
2018

index.d.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
export declare function get<T extends Element>(el: T, attr: string): string | null
2+
export declare function get<T extends Element>(el: T, attrs: string[]): Record<string, unknown>[] | null
3+
export declare function get<T extends Element>(els: T[], attr: string): string[] | null
4+
export declare function get<T extends Element>(els: T[], attrs: string[]): Record<string, unknown>[][] | null
5+
6+
export declare function set<T extends Element>(el: T, attr: string, val: unknown): T
7+
export declare function set<T extends Element>(el: T, attrs: Record<string, unknown>): T
8+
export declare function set<T extends Element>(els: T[], attr: string, val: unknown): T[]
9+
export declare function set<T extends Element>(els: T[], attrs: Record<string, unknown>): T[]
10+
11+
export declare function remove<T extends Element>(el: T, attr: string | string[]): T
12+
export declare function remove<T extends Element>(els: T[], attr: string | string[]): T[]
13+
14+
export default {
15+
get,
16+
set,
17+
remove
18+
}
19+
20+
21+

0 commit comments

Comments
 (0)