Skip to content

Commit

Permalink
Add missing flow types/copyright
Browse files Browse the repository at this point in the history
  • Loading branch information
mattphillips committed Sep 29, 2018
1 parent 24a43c6 commit 55e9188
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
7 changes: 7 additions & 0 deletions packages/jest-util/src/__tests__/error_with_stack.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Copyright (c) 2018-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import ErrorWithStack from '../error_with_stack';

describe('ErrorWithStack', () => {
Expand Down
9 changes: 8 additions & 1 deletion packages/jest-util/src/error_with_stack.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
/**
* Copyright (c) 2018-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

export default class ErrorWithStack extends Error {
constructor(message, callsite) {
constructor(message: string, callsite: Function) {
super(message);
if (Error.captureStackTrace) {
Error.captureStackTrace(this, callsite);
Expand Down

0 comments on commit 55e9188

Please sign in to comment.