Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions types/mapbox__maki/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Type definitions for @mapbox/maki 6.2
// Type definitions for @mapbox/maki 7.1
// Project: https://github.com/mapbox/maki
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Michael Bullington <https://github.com/mbullington>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/**
Expand All @@ -13,9 +14,7 @@ declare namespace maki {

declare const maki: {
/** Object that can be used to organize and display icons in your app or website */
layouts: {
all: maki.IconName[];
};
layouts: maki.IconName[];
svgArray: maki.SvgContent[];
};

Expand Down
5 changes: 2 additions & 3 deletions types/mapbox__maki/mapbox__maki-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ import maki = require('@mapbox/maki');
import { IconName, SvgContent } from '@mapbox/maki';
import fs = require('fs');

maki.layouts; // $ExpectType { all: string[]; }
maki.layouts.all; // $ExpectType string[]
maki.layouts; // $ExpectType string[]
maki.svgArray; // $ExpectType string[]

// api usage

const files: string[] = [];

files.forEach(fileName => {
maki.layouts.all.forEach((icon: IconName) => {
maki.layouts.forEach((icon: IconName) => {
fs.readFile(`${__dirname}/icons/${icon}-11.svg`, 'utf8', (err, file) => {
console.log(file);
});
Expand Down